崩溃:com.apple.main-thread SIGABRT ABORT 0x00000001beb420dc
0 libsystem_kernel.dylib 0x1beb420dc __pthread_kill + 8
1 libsystem_pthread.dylib 0x1bebbb094 pthread_kill$VARIANT$mp + 380
2 libsystem_c.dylib 0x1bea9bea8 abort + 140
3 APP 0x1008218d0 -[AppDelegate managedObjectContext] (AppDelegate.m:686)
4 APP 0x10081fbe8 -[AppDelegate application:didFinishLaunchingWithOptions:] (AppDelegate.m:165)
5 UIKitCore 0x1eb4df020 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 412
6 UIKitCore 0x1eb4e0784 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3352
7 UIKitCore 0x1eb4e5f10 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1540
8 UIKitCore 0x1eadaa104 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 776
9 UIKitCore 0x1eadb269c +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 160
10 UIKitCore 0x1eada9d88 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 236
11 UIKitCore 0x1eadaa678 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1064
12 UIKitCore 0x1eada89c4 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 744
13 UIKitCore 0x1eada868c -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 428
14 UIKitCore 0x1eadad1cc __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 220
15 UIKitCore 0x1eadadfb0 _performActionsWithDelayForTransitionContext + 112
16 UIKitCore 0x1eadad084 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 244
17 UIKitCore 0x1eadb1d84 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 360
18 UIKitCore 0x1eb4e4518 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 540
19 UIKitCore 0x1eb0e0f0c -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 360
20 FrontBoardServices 0x1c191ed44 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 440
21 FrontBoardServices 0x1c1928754 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 256
22 FrontBoardServices 0x1c1927f5c __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 64
23 libdispatch.dylib 0x1be9e57d4 _dispatch_client_callout + 16
24 libdispatch.dylib 0x1be98a5d8 _dispatch_block_invoke_direct$VARIANT$mp + 224
25 FrontBoardServices 0x1c19590bc __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 40
26 FrontBoardServices 0x1c1958d58 -[FBSSerialQueue _performNext] + 408
27 FrontBoardServices 0x1c1959310 -[FBSSerialQueue _performNextFromRunLoopSource] + 52
28 CoreFoundation 0x1bef362bc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
29 CoreFoundation 0x1bef3623c __CFRunLoopDoSource0 + 88
30 CoreFoundation 0x1bef35b24 __CFRunLoopDoSources0 + 176
31 CoreFoundation 0x1bef30a60 __CFRunLoopRun + 1004
32 CoreFoundation 0x1bef30354 CFRunLoopRunSpecific + 436
33 GraphicsServices 0x1c113079c GSEventRunModal + 104
34 UIKitCore 0x1eb4e7b68 UIApplicationMain + 212
35 App 0x100a35280 main (main.m:15)
36 libdyld.dylib 0x1be9f68e0 start + 4
我尝试在App中使用CoreData,但该应用在NsManagedObjectContext中崩溃。仅在iOS 12.2和更高版本中会发生这种情况。我在苹果论坛上提问,但没有收到正确答案。该代码可在iOS 11.0和更早版本中使用-我不知道这是iOS 12.2的新功能还是我的错误。 :(