我在这里搜索了其他一些问题/解决方案,但无法在我的应用中解决此问题。我不知道是什么问题。运行正常。
当我在“实际设备”或“模拟器”上运行我的应用程序时,它在启动屏幕上崩溃。这是崩溃日志。
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'FIRMessaging client not setup.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010cfd71bb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000010c0f9735 objc_exception_throw + 48
2 CoreFoundation 0x000000010cfd6f42 +[NSException raise:format:arguments:] + 98
3 Foundation 0x0000000109abc940 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 Tarfeeh 0x0000000106e7ee9c -[FIRMessaging connectWithCompletion:] + 556
5 Tarfeeh 0x0000000106dcb573 $S7Tarfeeh11AppDelegateC12connectToFcmyyF + 579
6 Tarfeeh 0x0000000106cd900f $S7Tarfeeh11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0j6LaunchI3KeyaypGSgtF + 2431
7 Tarfeeh 0x0000000106cd97f4 $S7Tarfeeh11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0j6LaunchI3KeyaypGSgtFTo + 228
8 UIKitCore 0x000000011290ebde -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 280
9 UIKitCore 0x00000001129105cb -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3979
10 UIKitCore 0x0000000112915c2f -[UIApplication _runWithMainScene:transitionContext:completion:] + 1623
11 UIKitCore 0x00000001121344e9 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 866
12 UIKitCore 0x000000011213d29c +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
13 UIKitCore 0x0000000112134126 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 233
14 UIKitCore 0x0000000112134ae0 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1085
15 UIKitCore 0x0000000112132cb5 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 795
16 UIKitCore 0x000000011213295f -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 435
17 UIKitCore 0x0000000112137a90 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 584
18 UIKitCore 0x000000011213880e _performActionsWithDelayForTransitionContext + 100
19 UIKitCore 0x00000001121377ef -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 221
20 UIKitCore 0x000000011213c93a -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
21 UIKitCore 0x000000011291444e -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 515
22 UIKitCore 0x00000001124b8d09 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 357
23 FrontBoardServices 0x00000001183da2da -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 448
24 FrontBoardServices 0x00000001183e5443 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 271
25 FrontBoardServices 0x00000001183e4b3a __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 53
26 libdispatch.dylib 0x000000010f016602 _dispatch_client_callout + 8
27 libdispatch.dylib 0x000000010f019b78 _dispatch_block_invoke_direct + 301
28 FrontBoardServices 0x0000000118419ba8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
29 FrontBoardServices 0x0000000118419860 -[FBSSerialQueue _performNext] + 457
30 FrontBoardServices 0x0000000118419e40 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
31 CoreFoundation 0x000000010cf3c721 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
32 CoreFoundation 0x000000010cf3bf93 __CFRunLoopDoSources0 + 243
33 CoreFoundation 0x000000010cf3663f __CFRunLoopRun + 1263
34 CoreFoundation 0x000000010cf35e11 CFRunLoopRunSpecific + 625
35 GraphicsServices 0x00000001154a61dd GSEventRunModal + 62
36 UIKitCore 0x000000011291781d UIApplicationMain + 140
37 Tarfeeh 0x0000000106cdab44 main + 68
38 libdyld.dylib 0x000000010f08c575 start + 1
39 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
我刚刚更新了我的Podfile,但它停止了工作。我无法还原到旧版本。
答案 0 :(得分:0)
在您的 AppDelegate 中添加FirebaseApp.configure()
。
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
FirebaseApp.configure()
}