Error Terminating app due to uncaught exception 'NSInvalidArgumentException' - ios

I've got an error while compiling (Release/Debug)
Terminating app due to uncaught exception NSInvalidArgumentException', reason: '-[__NSDictionaryM cordovaSettingForKey:]: unrecognized selector sent to instance 0x600003ea6ae0'
After build successfully myProject. I was open my project in Xcode and click the run button on Xcode. the project build successfully and display the lunch screen in simulator device. After that stuff I get an error in main.m, and this is what I see in console:
#import <UIKit/UIKit.h>
int main(int argc, char* argv[])
{
#autoreleasepool {
int retVal = UIApplicationMain(argc, argv, nil, #"AppDelegate"); Thread 1: signal SIGABRT
return retVal;
}
}
2019-09-27 15:19:14.943154+0530 myApp[3086:93649] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/mk/Library/Developer/CoreSimulator/Devices/EC5630C3-373A-45AD-A404-5628B1B329B9/data/Containers/Data/Application/06D2441B-F5B5-47B8-B6A7-68AEA36BB0D6/Library/Cookies/com.test.my-app.binarycookies
2019-09-27 15:19:14.954425+0530 myApp[3086:93649] Apache Cordova native platform version 5.0.1 is starting.
2019-09-27 15:19:14.954596+0530 myApp[3086:93649] Multi-tasking -> Device: YES, App: YES
2019-09-27 15:19:14.972439+0530 myApp[3086:93649] -[__NSDictionaryM cordovaSettingForKey:]: unrecognized selector sent to instance 0x6000011cc900
2019-09-27 15:19:14.981981+0530 myApp[3086:93649] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryM cordovaSettingForKey:]: unrecognized selector sent to instance 0x6000011cc900'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23b98bde __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff503b5b20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23bb9704 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x00007fff23b9d7bc ___forwarding___ + 1436
4 CoreFoundation 0x00007fff23b9f6c8 _CF_forwarding_prep_0 + 120
5 myApp 0x000000010a028723 -[CDVViewController viewDidLoad] + 227
6 myApp 0x000000010a004433 -[MainViewController viewDidLoad] + 51
7 UIKitCore 0x00007fff46af87c2 -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 83
8 UIKitCore 0x00007fff46afd6d3 -[UIViewController loadViewIfRequired] + 1084
9 UIKitCore 0x00007fff46afdaf0 -[UIViewController view] + 27
10 UIKitCore 0x00007fff47199b55 -[UIWindow addRootViewControllerViewIfPossible] + 150
11 UIKitCore 0x00007fff4719920b -[UIWindow _updateLayerOrderingAndSetLayerHidden:actionBlock:] + 232
12 UIKitCore 0x00007fff4719a2c9 -[UIWindow _setHidden:forced:] + 362
13 UIKitCore 0x00007fff471ad46d -[UIWindow _mainQueue_makeKeyAndVisible] + 42
14 myApp 0x000000010a01ef3f -[CDVAppDelegate application:didFinishLaunchingWithOptions:] + 703
15 myApp 0x000000010a0041ab -[AppDelegate application:didFinishLaunchingWithOptions:] + 187
16 UIKitCore 0x00007fff4715994f -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 232
17 UIKitCore 0x00007fff4715b2e7 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 3980
18 UIKitCore 0x00007fff47160c05 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1281
19 UIKitCore 0x00007fff468b58b1 -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 122
20 UIKitCore 0x00007fff46d96cd5 _UIScenePerformActionsWithLifecycleActionMask + 83
21 UIKitCore 0x00007fff468b63c3 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198
22 UIKitCore 0x00007fff468b5e84 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 474
23 UIKitCore 0x00007fff468b61f3 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 821
24 UIKitCore 0x00007fff468b5a85 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 345
25 UIKitCore 0x00007fff468b9e70 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 159
26 UIKitCore 0x00007fff46cbdf8b +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 865
27 UIKitCore 0x00007fff46db51cf _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 240
28 UIKitCore 0x00007fff468b9b9e __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 153
29 UIKitCore 0x00007fff46db50d2 _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 84
30 UIKitCore 0x00007fff468b9a0c -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 381
31 UIKitCore 0x00007fff46717c96 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 657
32 UIKitCore 0x00007fff4671681b -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 248
33 UIKitCore 0x00007fff467179c0 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 210
34 UIKitCore 0x00007fff4715f262 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 535
35 UIKitCore 0x00007fff46cdf774 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
36 FrontBoardServices 0x00007fff362e1d43 -[FBSSceneImpl _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 442
37 FrontBoardServices 0x00007fff3630a00c __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke.154 + 102
38 FrontBoardServices 0x00007fff362ecd21 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 220
39 FrontBoardServices 0x00007fff36309c9d __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke + 355
40 libdispatch.dylib 0x000000010a387d64 _dispatch_client_callout + 8
41 libdispatch.dylib 0x000000010a38acd5 _dispatch_block_invoke_direct + 300
42 FrontBoardServices 0x00007fff3633108a __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
43 FrontBoardServices 0x00007fff36330d78 -[FBSSerialQueue _queue_performNextIfPossible] + 441
44 FrontBoardServices 0x00007fff36331287 -[FBSSerialQueue _performNextFromRunLoopSource] + 22
45 CoreFoundation 0x00007fff23afbac1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
46 CoreFoundation 0x00007fff23afb9ec __CFRunLoopDoSource0 + 76
47 CoreFoundation 0x00007fff23afb1c4 __CFRunLoopDoSources0 + 180
48 CoreFoundation 0x00007fff23af5ecf __CFRunLoopRun + 1263
49 CoreFoundation 0x00007fff23af56b6 CFRunLoopRunSpecific + 438
50 GraphicsServices 0x00007fff3815cbb0 GSEventRunModal + 65
51 UIKitCore 0x00007fff47162a67 UIApplicationMain + 1621
52 myApp 0x000000010a0040d1 main + 65
53 libdyld.dylib 0x00007fff5123bcf5 start + 1
54 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

You've implemented -[ application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist .
Are you using notificayion in your app ,if so make what they are asking else check your app if there is a method that have un ended loop so that it is causing the app to throw execption of rebound.

Related

Not able to find crash Swift

App is crashing with these logs, but couldn't able to find what's causing the crash
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull set]: unrecognized selector sent to instance 0x118f33590'
*** First throw call stack:
(
0 CoreFoundation 0x0000000118ccf8ab __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00000001117a5ba3 objc_exception_throw + 48
2 CoreFoundation 0x0000000118cdeab8 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
3 CoreFoundation 0x0000000118cd3d71 ___forwarding___ + 1431
4 CoreFoundation 0x0000000118cd6068 _CF_forwarding_prep_0 + 120
5 UIFoundation 0x0000000125ff888b -[NSCoreTypesetter _NSFastDrawString:length:attributes:paragraphStyle:typesetterBehavior:lineBreakMode:rect:padding:graphicsContext:baselineRendering:usesFontLeading:usesScreenFont:scrollable:syncAlignment:mirrored:boundingRectPointer:baselineOffsetPointer:drawingContext:] + 5857
6 UIFoundation 0x0000000125ffa518 -[NSCoreTypesetter _stringDrawingCoreTextEngineWithOriginalString:rect:padding:graphicsContext:forceClipping:attributes:stringDrawingOptions:drawingContext:stringDrawingInterface:] + 1266
7 UIFoundation 0x0000000125ff1ea8 __NSStringDrawingEngine + 1882
8 UIFoundation 0x0000000125fef7a8 _NSStringDrawingCore + 173
9 UIFoundation 0x0000000125ff31ae -[NSAttributedString(NSExtendedStringDrawing) drawWithRect:options:context:] + 91
10 UIKitCore 0x0000000123c32a50 -[UILabel _drawTextInRect:baselineCalculationOnly:returningDeviceMetricsOfFirstLine:] + 4359
11 UIKitCore 0x0000000123c39393 -[UILabel _drawTextInRect:baselineCalculationOnly:] + 37
12 UIKitCore 0x0000000123c39c3f -[UILabel _drawTextInRect:] + 257
13 UIKitCore 0x0000000123c38e8a -[UILabel drawTextInRect:] + 615
14 UIKitCore 0x0000000123c39cd2 -[UILabel drawRect:] + 70
15 UIKitCore 0x0000000123d0881d -[UIView(CALayerDelegate) drawLayer:inContext:] + 613
16 QuartzCore 0x0000000114c3cd74 CABackingStoreUpdate_ + 223
17 QuartzCore 0x0000000114df5101 ___ZN2CA5Layer8display_Ev_block_invoke + 53
18 QuartzCore 0x0000000114deb29a -[CALayer _display] + 2114
19 QuartzCore 0x0000000114dfe748 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 464
20 QuartzCore 0x0000000114d0fb0c _ZN2CA7Context18commit_transactionEPNS_11TransactionEdPd + 626
21 QuartzCore 0x0000000114d4769b _ZN2CA11Transaction6commitEv + 735
22 QuartzCore 0x0000000114d48b64 _ZN2CA11Transaction25flush_as_runloop_observerEb + 60
23 CoreFoundation 0x0000000118c2e055 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
24 CoreFoundation 0x0000000118c289c2 __CFRunLoopDoObservers + 515
25 CoreFoundation 0x0000000118c28f0d __CFRunLoopRun + 1161
26 CoreFoundation 0x0000000118c286a7 CFRunLoopRunSpecific + 560
27 GraphicsServices 0x000000011d4df28a GSEventRunModal + 139
28 UIKitCore 0x00000001236d6ad3 -[UIApplication _run] + 994
29 UIKitCore 0x00000001236db9ef UIApplicationMain + 123
30 libswiftUIKit.dylib 0x0000000117366c72 $s5UIKit17UIApplicationMainys5Int32VAD_SpySpys4Int8VGGSgSSSgAJtF + 98
31 MyAppName 0x00000001044eb198 $sSo21UIApplicationDelegateP5UIKitE4mainyyFZ + 104
32 MyAppName 0x00000001044eb127 $s19MyAppName11AppDelegateC5$mainyyFZ + 39
33 MyAppName 0x00000001044eb2c8 main + 24
34 dyld 0x000000010e3e52bf start_sim + 10
35 ??? 0x0000000205ea6310 0x0 + 8689181456
)
libc++abi: terminating with uncaught exception of type NSException
Message from debugger: Terminated due to signal 6

After updating the Xcode 14 we facing the error with the Application circumvented Objective-C runtime dealloc initiation for <UIButton> object

After updating the Xcode to version 14 we faced a crash while launching the app. How can we fix this issue.
[13113:89575] *** Assertion failure in -[UIButton dealloc], UIView.m:4628
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Application circumvented Objective-C runtime dealloc initiation for object.'
*** First throw call stack:
(
0 CoreFoundation 0x00007ff800427378 __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007ff80004dbaf objc_exception_throw + 48
2 Foundation 0x00007ff800b876ac _userInfoForFileAndLine + 0
3 UIKitCore 0x000000011eb8e997 -[UIView dealloc] + 1458
4 UIKitCore 0x000000011dcfb835 -[UIButton dealloc] + 41
5 libobjc.A.dylib 0x00007ff80004b6a1 _ZN11objc_object17sidetable_releaseEbb + 203
6 CoreFoundation 0x00007ff8003144e8 __RELEASE_OBJECTS_IN_THE_ARRAY__ + 11
7 CoreFoundation 0x00007ff80031442e -[__NSArrayM dealloc] + 283
8 libobjc.A.dylib 0x00007ff80004b6a1 _ZN11objc_object17sidetable_releaseEbb + 203
9 libobjc.A.dylib 0x00007ff80004be64 _ZN19AutoreleasePoolPage12releaseUntilEPP11objc_object + 18
10 libobjc.A.dylib 0x00007ff80004bcad objc_autoreleasePoolPop + 203
11 UIKitCore 0x000000011e0a083b -[UINib instantiateWithOwner:options:] + 3109
12 UIKitCore 0x000000011dcaad51 -[UIViewController loadView] + 640
13 UIKitCore 0x000000011dcab0a7 -[UIViewController loadViewIfRequired] + 95
14 UIKitCore 0x000000011dbd6d7e -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 162
15 UIKitCore 0x000000011dbd70c2 -[UINavigationController _startTransition:fromViewController:toViewController:] + 227
16 UIKitCore 0x000000011dbd80c3 -[UINavigationController _startDeferredTransitionIfNeeded:] + 863
17 UIKitCore 0x000000011dbd9468 -[UINavigationController __viewWillLayoutSubviews] + 136
18 UIKitCore 0x000000011dbb704c -[UILayoutContainerView layoutSubviews] + 207
19 UIKitCore 0x000000011ebc0913 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2305
20 QuartzCore 0x00007ff8088f8cb8 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 526
21 QuartzCore 0x00007ff808904191 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 65
22 QuartzCore 0x00007ff80881821d _ZN2CA7Context18commit_transactionEPNS_11TransactionEdPd + 623
23 QuartzCore 0x00007ff80884fa56 _ZN2CA11Transaction6commitEv + 714
24 UIKitCore 0x000000011e5b831c __34-[UIApplication _firstCommitBlock]_block_invoke_2 + 34
25 CoreFoundation 0x00007ff800386cb1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
26 CoreFoundation 0x00007ff80038646a __CFRunLoopDoBlocks + 406
27 CoreFoundation 0x00007ff800380dc8 __CFRunLoopRun + 948
28 CoreFoundation 0x00007ff800380637 CFRunLoopRunSpecific + 560
29 GraphicsServices 0x00007ff809c0f28a GSEventRunModal + 139
30 UIKitCore 0x000000011e598425 -[UIApplication _run] + 994
31 UIKitCore 0x000000011e59d301 UIApplicationMain + 123
32 UK News 0x00000001071675e9 main + 73
33 dyld 0x0000000108a142bf start_sim + 10
34 ??? 0x0000000109c6252e 0x0 + 4458947886
)
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Application circumvented Objective-C runtime dealloc initiation for <UIButton> object.'
CoreSimulator 857.7 - Device: iPhone 14 (722946E3-1DBE-4032-911B-51C89F27E522) - R
Search initialise method in your project and replace it with load method. Check it below.
Find
+(void)initialize
{
[super initialize];
}
Replace
+(void)load
{
[super load];
}

Error: DiskCookieStorage changing policy from 2 to 0, cookie file

I've got an error while compiling in Xcode (Release/Debug)
DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/mk/Library/Developer/CoreSimulator/Devices/EC5630C3-373A-45AD-A404-5628B1B329B9/data/Containers/Data/Application/06D2441B-F5B5-47B8-B6A7-68AEA36BB0D6/Library/Cookies/com.test.my-app.binarycookies
I tried to install cordova-sqlite-storage and remove ios platform and reinstall ios platform and build project for IOS
I have no code to show because is terminating with uncaught exception error.
My app build successful for IOS in ionic.
After that I open the project in Xcode and run the project in simulator device then stuff I get an error in main.m
what I see in console:
2019-09-27 15:19:14.943154+0530 myApp[3086:93649] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/mk/Library/Developer/CoreSimulator/Devices/EC5630C3-373A-45AD-A404-5628B1B329B9/data/Containers/Data/Application/06D2441B-F5B5-47B8-B6A7-68AEA36BB0D6/Library/Cookies/com.test.my-app.binarycookies
2019-09-27 15:19:14.954425+0530 myApp[3086:93649] Apache Cordova native platform version 5.0.1 is starting.
2019-09-27 15:19:14.954596+0530 myApp[3086:93649] Multi-tasking -> Device: YES, App: YES
2019-09-27 15:19:14.972439+0530 myApp[3086:93649] -[__NSDictionaryM cordovaSettingForKey:]: unrecognized selector sent to instance 0x6000011cc900
2019-09-27 15:19:14.981981+0530 myApp[3086:93649] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryM cordovaSettingForKey:]: unrecognized selector sent to instance 0x6000011cc900'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23b98bde __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff503b5b20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23bb9704 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x00007fff23b9d7bc ___forwarding___ + 1436
4 CoreFoundation 0x00007fff23b9f6c8 _CF_forwarding_prep_0 + 120
5 myApp 0x000000010a028723 -[CDVViewController viewDidLoad] + 227
6 myApp 0x000000010a004433 -[MainViewController viewDidLoad] + 51
7 UIKitCore 0x00007fff46af87c2 -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 83
8 UIKitCore 0x00007fff46afd6d3 -[UIViewController loadViewIfRequired] + 1084
9 UIKitCore 0x00007fff46afdaf0 -[UIViewController view] + 27
10 UIKitCore 0x00007fff47199b55 -[UIWindow addRootViewControllerViewIfPossible] + 150
11 UIKitCore 0x00007fff4719920b -[UIWindow _updateLayerOrderingAndSetLayerHidden:actionBlock:] + 232
12 UIKitCore 0x00007fff4719a2c9 -[UIWindow _setHidden:forced:] + 362
13 UIKitCore 0x00007fff471ad46d -[UIWindow _mainQueue_makeKeyAndVisible] + 42
14 myApp 0x000000010a01ef3f -[CDVAppDelegate application:didFinishLaunchingWithOptions:] + 703
15 myApp 0x000000010a0041ab -[AppDelegate application:didFinishLaunchingWithOptions:] + 187
16 UIKitCore 0x00007fff4715994f -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 232
17 UIKitCore 0x00007fff4715b2e7 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 3980
18 UIKitCore 0x00007fff47160c05 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1281
19 UIKitCore 0x00007fff468b58b1 -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 122
20 UIKitCore 0x00007fff46d96cd5 _UIScenePerformActionsWithLifecycleActionMask + 83
21 UIKitCore 0x00007fff468b63c3 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198
22 UIKitCore 0x00007fff468b5e84 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 474
23 UIKitCore 0x00007fff468b61f3 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 821
24 UIKitCore 0x00007fff468b5a85 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 345
25 UIKitCore 0x00007fff468b9e70 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 159
26 UIKitCore 0x00007fff46cbdf8b +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 865
27 UIKitCore 0x00007fff46db51cf _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 240
28 UIKitCore 0x00007fff468b9b9e __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 153
29 UIKitCore 0x00007fff46db50d2 _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 84
30 UIKitCore 0x00007fff468b9a0c -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 381
31 UIKitCore 0x00007fff46717c96 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 657
32 UIKitCore 0x00007fff4671681b -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 248
33 UIKitCore 0x00007fff467179c0 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 210
34 UIKitCore 0x00007fff4715f262 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 535
35 UIKitCore 0x00007fff46cdf774 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
36 FrontBoardServices 0x00007fff362e1d43 -[FBSSceneImpl _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 442
37 FrontBoardServices 0x00007fff3630a00c __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke.154 + 102
38 FrontBoardServices 0x00007fff362ecd21 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 220
39 FrontBoardServices 0x00007fff36309c9d __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke + 355
40 libdispatch.dylib 0x000000010a387d64 _dispatch_client_callout + 8
41 libdispatch.dylib 0x000000010a38acd5 _dispatch_block_invoke_direct + 300
42 FrontBoardServices 0x00007fff3633108a __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
43 FrontBoardServices 0x00007fff36330d78 -[FBSSerialQueue _queue_performNextIfPossible] + 441
44 FrontBoardServices 0x00007fff36331287 -[FBSSerialQueue _performNextFromRunLoopSource] + 22
45 CoreFoundation 0x00007fff23afbac1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
46 CoreFoundation 0x00007fff23afb9ec __CFRunLoopDoSource0 + 76
47 CoreFoundation 0x00007fff23afb1c4 __CFRunLoopDoSources0 + 180
48 CoreFoundation 0x00007fff23af5ecf __CFRunLoopRun + 1263
49 CoreFoundation 0x00007fff23af56b6 CFRunLoopRunSpecific + 438
50 GraphicsServices 0x00007fff3815cbb0 GSEventRunModal + 65
51 UIKitCore 0x00007fff47162a67 UIApplicationMain + 1621
52 myApp 0x000000010a0040d1 main + 65
53 libdyld.dylib 0x00007fff5123bcf5 start + 1
54 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

Get "'Can't modify a named fetch request in an immutable model" using nspredicate

I am using fetchRequestTemplate with NSPredicate to get data. I get "Thread 1: signal SIGABRT" on the following bit of code:
fetchRequest.predicate = NSPredicate(format: "userID == %#", userID)
Here is the full description of the problem:
2019-01-18 16:36:54.084567+0300 Chat[62769:8009479] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Can't modify a named fetch request in an immutable model.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000107e811bb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x0000000106e73735 objc_exception_throw + 48
2 CoreData 0x00000001077c7217 -[NSFetchRequest(_NSInternalMethods) _throwIfNotEditable] + 71
3 CoreData 0x00000001077c725e -[NSFetchRequest setPredicate:] + 30
4 Chat 0x00000001064d2db7 $S4Chat7MessageC11getMessages3for2inSayACGSgSS_So22NSManagedObjectContextCtFZ
+ 871
5 Chat 0x00000001064d2430 $S4Chat14StorageManagerC12readMessages3forSayAA12MessageModelCGSS_tF + 336
6 Chat 0x00000001064abfa9 $S4Chat20CommunicationManagerCACycfc + 2553
7 Chat 0x00000001064a8130 $S4Chat20CommunicationManagerCACycfC + 64
8 Chat 0x00000001064a80dc globalinit_33_C5FFB30340A1F300E36AFF644D48A8DA_func0 + 28
9 libdispatch.dylib 0x000000010a30a602 _dispatch_client_callout + 8
10 libdispatch.dylib 0x000000010a30c0c4 _dispatch_once_callout + 66
11 libswiftCore.dylib 0x0000000108676ea9 swift_once + 25
12 Chat 0x00000001064a81b4 $S4Chat20CommunicationManagerC06sharedbC0ACvau + 36
13 Chat 0x00000001064d599f $S4Chat11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0j6LaunchI3KeyaypGSgtF
+ 159
14 Chat 0x00000001064d5ac4 $S4Chat11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0j6LaunchI3KeyaypGSgtFTo
+ 228
15 UIKitCore 0x000000010bd02bde -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 280
16 UIKitCore 0x000000010bd045cb -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3979
17 UIKitCore 0x000000010bd09c2f -[UIApplication _runWithMainScene:transitionContext:completion:] + 1623
18 UIKitCore 0x000000010b5284e9 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke
+ 866
19 UIKitCore 0x000000010b53129c +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
20 UIKitCore 0x000000010b528126 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 233
21 UIKitCore 0x000000010b528ae0 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1085
22 UIKitCore 0x000000010b526cb5 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke
+ 795
23 UIKitCore 0x000000010b52695f -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 435
24 UIKitCore 0x000000010b52ba90 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke
+ 584
25 UIKitCore 0x000000010b52c80e _performActionsWithDelayForTransitionContext + 100
26 UIKitCore 0x000000010b52b7ef -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]
+ 221
27 UIKitCore 0x000000010b53093a -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
28 UIKitCore 0x000000010bd0844e -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 515
29 UIKitCore 0x000000010b8acd09 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 357
30 FrontBoardServices 0x00000001143e82da -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 448
31 FrontBoardServices 0x00000001143f3443 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 271
32 FrontBoardServices 0x00000001143f2b3a __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 53
33 libdispatch.dylib 0x000000010a30a602 _dispatch_client_callout + 8
34 libdispatch.dylib 0x000000010a30db78 _dispatch_block_invoke_direct + 301
35 FrontBoardServices 0x0000000114427ba8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
36 FrontBoardServices 0x0000000114427860 -[FBSSerialQueue _performNext] + 457
37 FrontBoardServices 0x0000000114427e40 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
38 CoreFoundation 0x0000000107de6721 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
39 CoreFoundation 0x0000000107de5f93 __CFRunLoopDoSources0 + 243
40 CoreFoundation 0x0000000107de063f __CFRunLoopRun + 1263
41 CoreFoundation 0x0000000107ddfe11 CFRunLoopRunSpecific + 625
42 GraphicsServices 0x00000001114271dd GSEventRunModal + 62
43 UIKitCore 0x000000010bd0b81d UIApplicationMain + 140
44 Chat 0x00000001064d7037 main + 71
45 libdyld.dylib 0x000000010a380575 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

Crash app libc++abi.dylib (Admob)

Hello have crash app in IOS
This log:
2015-01-15 13:23:32.490 App[23898:1611888] <Google> Category methods are not loaded. Make sure you link the Google Mobile Ads library using one of the -ObjC, -force_load, or -all_load linker flags. See https://developers.google.com/mobile-ads-sdk/docs/#ios for more information.
2015-01-15 13:23:34.526 App[23898:1611888] registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later.
2015-01-15 13:23:34.802 App[23898:1611888] +[NSDecimalNumber gad_negativeOne]: unrecognized selector sent to class 0x7d7400
2015-01-15 13:23:34.805 App[23898:1611888] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSDecimalNumber gad_negativeOne]: unrecognized selector sent to class 0x7d7400'
*** First throw call stack:
(
0 CoreFoundation 0x03278946 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x02be0a97 objc_exception_throw + 44
2 CoreFoundation 0x03280465 +[NSObject(NSObject) doesNotRecognizeSelector:] + 277
3 CoreFoundation 0x031c93e7 ___forwarding___ + 1047
4 CoreFoundation 0x031c8fae _CF_forwarding_prep_0 + 14
5 App 0x000872ea -[GADStatisticDictionary decrementNumberForKey:shouldNotifyDelegate:] + 58
6 App 0x0007cc75 -[GADApplication init] + 512
7 App 0x0007ca45 __35+[GADApplication sharedApplication]_block_invoke + 55
8 libdispatch.dylib 0x03ecde2f _dispatch_client_callout + 14
9 libdispatch.dylib 0x03eb876c dispatch_once_f + 363
10 libdispatch.dylib 0x03eb85fc dispatch_once + 31
11 App 0x0007ca0c +[GADApplication sharedApplication] + 113
12 App 0x000780cd +[GADSlot initialize] + 67
13 libobjc.A.dylib 0x02be1461 _class_initialize + 576
14 libobjc.A.dylib 0x02be9fe5 lookUpImpOrForward + 339
15 libobjc.A.dylib 0x02be9e8d _class_lookupMethodAndLoadCache3 + 55
16 libobjc.A.dylib 0x02bf412f objc_msgSend + 139
17 App 0x00075f6a -[GADBannerView commonInitWithAdSize:] + 42
18 App 0x0007626e -[GADBannerView initWithCoder:] + 163
19 UIKit 0x00c5205e -[UIClassSwapper initWithCoder:] + 239
20 UIKit 0x00de7f1a UINibDecoderDecodeObjectForValue + 739
21 UIKit 0x00de7c2f -[UINibDecoder decodeObjectForKey:] + 371
22 UIKit 0x00c51bf1 -[UIRuntimeConnection initWithCoder:] + 189
23 UIKit 0x00de7f1a UINibDecoderDecodeObjectForValue + 739
24 UIKit 0x00de811c UINibDecoderDecodeObjectForValue + 1253
25 UIKit 0x00de7c2f -[UINibDecoder decodeObjectForKey:] + 371
26 UIKit 0x00c50ea7 -[UINib instantiateWithOwner:options:] + 1164
27 UIKit 0x00a73624 -[UIViewController _loadViewFromNibNamed:bundle:] + 270
28 UIKit 0x00a73dbb -[UIViewController loadView] + 295
29 UIKit 0x00a73fef -[UIViewController loadViewIfRequired] + 78
30 UIKit 0x00a74595 -[UIViewController view] + 35
31 UIKit 0x0096b825 -[UIWindow addRootViewControllerViewIfPossible] + 66
32 UIKit 0x0096bc99 -[UIWindow _setHidden:forced:] + 287
33 UIKit 0x0096bf50 -[UIWindow _orderFrontWithoutMakingKey] + 49
34 UIKit 0x0097a28d -[UIWindow makeKeyAndVisible] + 80
35 UIKit 0x00917776 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3108
36 UIKit 0x0091ac0d -[UIApplication _runWithMainScene:transitionContext:completion:] + 1639
37 UIKit 0x009337d0 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke + 59
38 UIKit 0x0091981f -[UIApplication workspaceDidEndTransaction:] + 155
39 FrontBoardServices 0x05b799de __37-[FBSWorkspace clientEndTransaction:]_block_invoke_2 + 71
40 FrontBoardServices 0x05b7946f __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 54
41 FrontBoardServices 0x05b8b425 __31-[FBSSerialQueue performAsync:]_block_invoke + 26
42 CoreFoundation 0x0319c1c0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 16
43 CoreFoundation 0x03191ad3 __CFRunLoopDoBlocks + 195
44 CoreFoundation 0x03191238 __CFRunLoopRun + 936
45 CoreFoundation 0x03190bcb CFRunLoopRunSpecific + 443
46 CoreFoundation 0x031909fb CFRunLoopRunInMode + 123
47 UIKit 0x009191e4 -[UIApplication _run] + 571
48 UIKit 0x0091c8b6 UIApplicationMain + 1526
49 App 0x0005991d main + 141
50 libdyld.dylib 0x03ef9ac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Try to add -ObjC to Other Linker Flags in the Build Settings tab.

Resources