Ionic Xcode / Thread 1: signal SIGABRT


#1

Hello.
When I run my project in Xcode, I get an error like the screenshot above.
Below is debug.

2017-11-07 11:39:57.463 MyApp[4633:99769] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/twowinscom/Library/Developer/CoreSimulator/Devices/CA9CBE77-40FF-44B3-BF39-FA1F389729FA/data/Containers/Data/Application/7D29FF1E-90C2-485B-AB7A-2DFAD27F3C7E/Library/Cookies/io.ionic.starter.binarycookies
2017-11-07 11:39:57.570 MyApp[4633:99769] Apache Cordova native platform version 4.5.3 is starting.
2017-11-07 11:39:57.571 MyApp[4633:99769] Multi-tasking -> Device: YES, App: YES
2017-11-07 11:39:57.606 MyApp[4633:99769] CDVWKWebViewEngine: trying to inject XHR polyfill
2017-11-07 11:39:57.656 MyApp[4633:99769] CDVWKWebViewEngine will reload WKWebView if required on resume
2017-11-07 11:39:57.656 MyApp[4633:99769] Using Ionic WKWebView
2017-11-07 11:39:57.657 MyApp[4633:99769] [CDVTimer][console] 0.333011ms
2017-11-07 11:39:57.658 MyApp[4633:99769] [CDVTimer][handleopenurl] 0.145018ms
2017-11-07 11:39:57.661 MyApp[4633:99769] [CDVTimer][intentandnavigationfilter] 2.488017ms
2017-11-07 11:39:57.661 MyApp[4633:99769] [CDVTimer][gesturehandler] 0.097990ms
2017-11-07 11:39:57.705 MyApp[4633:99769] [CDVTimer][splashscreen] 43.402970ms
2017-11-07 11:39:57.707 MyApp[4633:99769] [CDVTimer][keyboard] 1.358032ms
2017-11-07 11:39:57.707 MyApp[4633:99769] [CDVTimer][TotalPluginStartup] 50.179005ms
2017-11-07 11:39:58.917 MyApp[4633:99769] *** Assertion failure in -[CLLocationManager setAllowsBackgroundLocationUpdates:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreLocationFramework_Sim/CoreLocation-1861.0.15/Framework/CoreLocation/CLLocationManager.m:604
2017-11-07 11:39:58.924 MyApp[4633:99769] *** Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘Invalid parameter not satisfying: !stayUp || CLClientIsBackgroundable(internal->fClient)’
*** First throw call stack:
(
0 CoreFoundation 0x0000000104699f45 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000103991deb objc_exception_throw + 48
2 CoreFoundation 0x0000000104699daa +[NSException raise:format:arguments:] + 106
3 Foundation 0x00000001035de5ee -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
4 CoreLocation 0x00000001034a3023 CLClientGetCapabilities + 8270
5 MyApp 0x0000000102d265d6 -[CDVLocationManager initLocationManager] + 342
6 MyApp 0x0000000102d26401 -[CDVLocationManager pluginInitialize] + 97
7 MyApp 0x0000000102d38e8b -[CDVViewController registerPlugin:withClassName:] + 315
8 MyApp 0x0000000102d3927a -[CDVViewController getCommandInstance:] + 410
9 MyApp 0x0000000102d3d8d4 -[CDVCommandDelegateImpl getCommandInstance:] + 100
10 MyApp 0x0000000102d47015 -[CDVCommandQueue execute:] + 341
11 MyApp 0x0000000102cfc9da -[CDVWKWebViewEngine handleCordovaMessage:] + 202
12 MyApp 0x0000000102cfc857 -[CDVWKWebViewEngine userContentController:didReceiveScriptMessage:] + 183
13 MyApp 0x0000000102cfe3bc -[CDVWKWeakScriptMessageHandler userContentController:didReceiveScriptMessage:] + 124
14 WebKit 0x00000001030a0599 _ZN28ScriptMessageHandlerDelegate14didPostMessageERN6WebKit12WebPageProxyERNS0_13WebFrameProxyERKNS0_18SecurityOriginDataERN7WebCore21SerializedScriptValueE + 217
15 WebKit 0x000000010304b957 _ZN6WebKit29WebUserContentControllerProxy14didPostMessageERN3IPC10ConnectionEyyRKNS_18SecurityOriginDataEyRKNS1_13DataReferenceE + 221
16 WebKit 0x000000010304d64c ZN3IPC13handleMessageIN8Messages29WebUserContentControllerProxy14DidPostMessageEN6WebKit29WebUserContentControllerProxyEMS5_FvRNS_10ConnectionEyyRKNS4_18SecurityOriginDataEyRKNS_13DataReferenceEEEEvS7_RNS_14MessageDecoderEPT0_T1 + 142
17 WebKit 0x0000000102eac845 _ZN3IPC18MessageReceiverMap15dispatchMessageERNS_10ConnectionERNS_14MessageDecoderE + 113
18 WebKit 0x000000010302eff4 _ZN6WebKit15WebProcessProxy17didReceiveMessageERN3IPC10ConnectionERNS1_14MessageDecoderE + 24
19 WebKit 0x0000000102e6b13e _ZN3IPC10Connection15dispatchMessageENSt3__110unique_ptrINS_14MessageDecoderENS1_14default_deleteIS3_EEEE + 102
20 WebKit 0x0000000102e6d406 _ZN3IPC10Connection18dispatchOneMessageEv + 114
21 JavaScriptCore 0x000000010718eaf5 _ZN3WTF7RunLoop11performWorkEv + 437
22 JavaScriptCore 0x000000010718f1d2 _ZN3WTF7RunLoop11performWorkEPv + 34
23 CoreFoundation 0x00000001045c6011 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
24 CoreFoundation 0x00000001045bbf3c __CFRunLoopDoSources0 + 556
25 CoreFoundation 0x00000001045bb3f3 __CFRunLoopRun + 867
26 CoreFoundation 0x00000001045bae08 CFRunLoopRunSpecific + 488
27 GraphicsServices 0x000000010660fad2 GSEventRunModal + 161
28 UIKit 0x0000000104db330d UIApplicationMain + 171
29 MyApp 0x0000000102cf8321 main + 65
30 libdyld.dylib 0x000000010951392d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

Why does this error occur and how can I resolve it?
Please ask for help.
Thank you in advance.


#3

Try to Remove ios platform & add platform again and check its working!


#4

I tried it but it does not work out.


#5

I had the same problem


#6

I end myself.
/platform/ios/AppName/AppName-Info.plist
add
<key>UIBackgroundModes</key>
<array>
<string>location</string>
</array>