单击贝宝时,Ionic 3 IOS 应用程序崩溃

Ionic 3 IOS application crash when click on paypal

step 1

step 2

This is the error I am getting on clicking paypal button

error

此应用在 Android 上运行良好。但是在 IOS 上崩溃了。由IONIC 3构建。如何解决这个问题? 租金按钮将重定向到 PayPal。使用 PayPal 沙盒帐户。 请帮忙。谢谢

2018-05-21 13:04:03.754557+0530 thegrand[665:8151] DiskCookieStorage更改策略从2变为0,cookie文件:file:///Users/krishanu_mukherjee/Library/Developer/CoreSimulator/Devices/67065A2C-5E45-47EB-AAD8-5F2E8D5149F4/data/Containers/Data/Application/13D49686-3CB1-4CC3-9967-772BBC693FFA/Library/Cookies/io.ionic.starter.binarycookies 2018-05-21 13:04:04.026035+0530 thegrand[665:8151] Apache Cordova 原生平台版本 4.5.3 正在启动。 2018-05-21 13:04:04.028647+0530 thegrand[665:8151] 多任务处理 -> 设备:是,应用程序:是 2018-05-21 13:04:04.118347+0530 thegrand[665:8151] CDVWKWebViewEngine:尝试注入 XHR polyfill 2018-05-21 13:04:04.468109+0530 thegrand[665:8151] 如果简历需要,CDVWKWebViewEngine 将重新加载 WKWebView 2018-05-21 13:04:04.468371+0530 thegrand[665:8151] 使用 Ionic WKWebView 2018-05-21 13:04:04.470572+0530 thegrand[665:8151] [CDVTimer][控制台] 0.168085ms 2018-05-21 13:04:04.470968+0530 thegrand[665:8151] [CDVTimer][handleopenurl] 0.163078ms 2018-05-21 13:04:04.474148+0530 thegrand[665:8151] [CDVTimer][intentandnavigationfilter] 3.002048ms 2018-05-21 13:04:04.474516+0530 thegrand[665:8151] [CDVTimer][gesturehandler] 0.118971ms 2018-05-21 13:04:04.474793+0530 thegrand[665:8151] [CDVTimer][paypalmobile] 0.108004ms 2018-05-21 13:04:04.475352+0530 thegrand[665:8151] CDVIonicKeyboard:调整大小模式 1 2018-05-21 13:04:04.476834+0530 thegrand[665:8151] [CDVTimer][键盘] 1.547933ms 2018-05-21 13:04:04.533597+0530 thegrand[665:8151] [CDVTimer][splashscreen] 56.516051ms 2018-05-21 13:04:04.533796+0530 thegrand[665:8151] [CDVTimer][TotalPluginStartup] 63.489914ms 2018-05-21 13:04:12.591638+0530 thegrand[665:8151] Angular 运行 正在开发模式中。调用 enableProdMode() 以启用生产模式。 2018-05-21 13:04:12.592087+0530 thegrand[665:8151] deviceready 5 秒后未触发​​。 2018-05-21 13:04:12.592766+0530 thegrand[665:8151] 频道未触发:onDOMContentLoaded 2018-05-21 13:04:12.593073+0530 thegrand[665:8151] Ionic Native:4048 毫秒后触发设备就绪事件 2018-05-21 13:04:12.896733+0530 thegrand[665:8151] 警告:本机:尝试调用 StatusBar.styleDefault,但未安装 StatusBar 插件。 2018-05-21 13:04:12.897143+0530 thegrand[665:8151] 警告:安装 StatusBar 插件:'ionic cordova plugin add cordova-plugin-statusbar' 2018-05-21 13:04:13.135458+0530 thegrand[665:8151] CDVWKWebViewEngine: handleStopScroll 2018-05-21 13:04:13.172548+0530 thegrand[665:8151] 警告:Google 地图 API 警告:NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys 2018-05-21 13:04:13.407415+0530 thegrand[665:8151] 错误:Google 地图 API 错误:MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error 2018-05-21 13:04:20.262243+0530 thegrand[665:8151] CDVWKWebViewEngine: handleStopScroll 2018-05-21 13:04:23.648832+0530 thegrand[665:8151] CDVWKWebViewEngine: handleStopScroll 2018-05-21 13:04:27.249545+0530 thegrand[665:8151] CDVWKWebViewEngine: handleStopScroll 2018-05-21 13:04:30.888592+0530 thegrand[665:8151] CDVWKWebViewEngine: handleStopScroll 2018-05-21 13:04:32.490485+0530 格兰德[665:8151] 1 0 2018-05-21 13:04:32.856165+0530 thegrand[665:8923] 在主线程以外的线程上执行的调度队列上创建了位置管理器 (0x7fbb58f11990)。开发人员有责任确保在分配位置管理器对象的线程上有一个 运行 循环 运行ning。特别是,不支持在任意调度队列(不附加到主队列)中创建位置管理器,这将导致无法接收到回调。 2018-05-21 13:04:32.971875+0530 thegrand[665:8924] -[NSCFNumber 长度]:无法识别的选择器发送到实例 0xb0000000000000c5 2018-05-21 13:04:32.978500+0530 thegrand[665:8924] *** 由于未捕获的异常 'NSInvalidArgumentException' 而终止应用程序,原因:'-[__NSCFNumber 长度]:无法识别的选择器发送到实例 0xb0000000000000c5' *** 首先抛出调用栈: ( 0 核心基础 0x0000000108eb71e6 __exceptionPreprocess + 294 1 libobjc.A.dylib 0x000000010851e031 objc_exception_throw + 48 2 CoreFoundation 0x0000000108f38784 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132 3 核心基础 0x0000000108e39898 ___forwarding_ + 1432 4 核心基础 0x0000000108e39278 _CF_forwarding_prep_0 + 120 5 基金会 0x00000001042cba3c -[NSScanner(NSDecimalNumberScanning) scanDecimal:] + 303 6 基金会 0x0000000104355f41 -[NSDecimalNumberPlaceholder initWithString:locale:] + 127 7 基金会 0x00000001043561de +[NSDecimalNumber decimalNumberWithString:] + 46 8 thegrand 0x0000000102fb0535 __51-[PayPalMobileCordovaPlugin renderSinglePaymentUI:]_block_invoke + 1013 9 libdispatch.dylib 0x000000010a721807 _dispatch_call_block_and_release + 12 10 libdispatch.dylib 0x000000010a722848 _dispatch_client_callout + 8 11 libdispatch.dylib 0x000000010a727675 _dispatch_queue_override_invoke + 1451 12 libdispatch.dylib 0x000000010a72e3c8 _dispatch_root_queue_drain + 664 13 libdispatch.dylib 0x000000010a72e0d2 _dispatch_worker_thread3 + 132 14 libsystem_pthread.dylib 0x000000010ac4c1ca _pthread_wqthread + 1387 15 libsystem_pthread.dylib 0x000000010ac4bc4d start_wqthread + 13 ) libc++abi.dylib:以 NSException

类型的未捕获异常终止

我猜你正在使用 ionic native paypal plugin 你会发现行

this.payPal.prepareToRender('PayPalEnvironmentSandbox', new PayPalConfiguration({
    // Only needed if you get an "Internal Service Error" after PayPal login!
    //payPalShippingAddressOption: 2 // PayPalShippingAddressOptionPayPal
})).then(() => {
    let payment = new PayPalPayment('3.33', 'USD', 'Description', 'sale');
    this.payPal.renderSinglePaymentUI(payment).then(() => {

价格将是整数,例如 -> 3.33 而不是字符串“3.33” 在 android 的情况下,它会正常工作,但在 ios 的情况下,它会使应用程序崩溃