以 Xcode 10 和 iOS 12 开头的 Fabric Answer 应用崩溃 iOS

Fabric Answer crash iOS app on start with Xcode 10 and iOS 12

编辑:

Xcode 10 beta 6 fix the problem


我正在使用新的 xcode 10 为 ios 12 更新我的应用程序,但是 Fabric 框架使应用程序在启动时崩溃。

我只 运行 代码和应用程​​序在启动屏幕上崩溃。

在我的 AppDelegate 中:

#import <Fabric/Fabric.h>
#import <Answers/Answers.h>

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

   [Fabric with:@[[Answers class]]];

   return YES;
}

这是出现的日志:

+[NSRecursiveLock dictionary]: unrecognized selector sent to class 0x233a30580
(lldb)  

我还按照指南中的说明添加了以下文字:

这是在 AppDelegate.m

这是崩溃日志

Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 libsystem_kernel.dylib 0x00000001fa545104 pthread_kill + 8 1 libsystem_pthread.dylib 0x00000001fa5c4a00 pthread_kill$VARIANT$armv81 + 296 2
libsystem_c.dylib 0x00000001fa49cd78 abort + 140 3
libc++abi.dylib 0x00000001f9b64f78 __cxa_bad_cast + 0 4 libc++abi.dylib 0x00000001f9b65120 default_unexpected_handler+ 8480 () + 0 5 libobjc.A.dylib
0x00000001f9b7de48 _objc_terminate+ 28232 () + 124 6
libc++abi.dylib 0x00000001f9b710fc std::__terminate(void (*)+ 57596 ()) + 16 7 libc++abi.dylib
0x00000001f9b71188 std::terminate+ 57736 () + 84 8
libdispatch.dylib 0x00000001fa3e8498 _dispatch_client_callout + 36 9 libdispatch.dylib 0x00000001fa3b8260 _dispatch_once_callout + 28 10 Reflex
0x0000000100b5280c +[Fabric sharedSDK] + 112 11 Reflex
0x0000000100b52984 __15+[Fabric with:]_block_invoke + 76 12 libdispatch.dylib 0x00000001fa3e8484 _dispatch_client_callout + 16 13 libdispatch.dylib 0x00000001fa3b8260 _dispatch_once_callout + 28 14 Reflex
0x0000000100b52934 +[Fabric with:] + 224 15 Reflex
0x00000001009f3600 -[AppDelegate application:didFinishLaunchingWithOptions:] + 1439232 (AppDelegate.m:64) 16 UIKitCore
0x0000000226f51564 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 412 17 UIKitCore 0x0000000226f52ccc -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3340 18 UIKitCore 0x0000000226f58718 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1552 19 UIKitCore 0x000000022777f6dc __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 784 20 UIKitCore 0x000000022777bc88 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 160 21 UIKitCore 0x000000022777f358 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 240 22 UIKitCore 0x000000022777fcf8 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1076 23 UIKitCore
0x000000022773ef20 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 772 24 UIKitCore 0x000000022773ebcc -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 432 25 UIKitCore 0x0000000227782168 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 220 26 UIKitCore 0x0000000227782c58 _performActionsWithDelayForTransitionContext + 112 27 UIKitCore 0x0000000227782020 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 248 28 UIKitCore 0x000000022777b334 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 368 29 UIKitCore 0x0000000226f56c10 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 540 30 UIKitCore 0x0000000226f883c8 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 364 31 FrontBoardServices 0x00000001fd3db890 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 444 32 FrontBoardServices 0x00000001fd3e6658 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 260 33 FrontBoardServices 0x00000001fd3e5d50 __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 64 34 libdispatch.dylib 0x00000001fa3e8484 _dispatch_client_callout + 16 35 libdispatch.dylib 0x00000001fa3bf3f0 _dispatch_block_invoke_direct$VARIANT$armv81 + 216 36 FrontBoardServices 0x00000001fd41a640 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK
+ 40 37 FrontBoardServices 0x00000001fd41a2cc -[FBSSerialQueue _performNext] + 416 38 FrontBoardServices 0x00000001fd41a8e8 -[FBSSerialQueue _performNextFromRunLoopSource] + 56 39 CoreFoundation 0x00000001fa93e5b8 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 24 40 CoreFoundation 0x00000001fa93e538 __CFRunLoopDoSource0 + 88 41 CoreFoundation 0x00000001fa93de1c __CFRunLoopDoSources0 + 176 42 CoreFoundation 0x00000001fa938ce8 __CFRunLoopRun + 1040 43 CoreFoundation
0x00000001fa9385b8 CFRunLoopRunSpecific + 436 44 GraphicsServices
0x00000001fcba8584 GSEventRunModal + 100 45 UIKitCore
0x0000000226f5a4c4 UIApplicationMain + 212 46 Reflex
0x0000000100a663d0 main + 1909712 (main.m:14) 47 libdyld.dylib
0x00000001fa3f8c0c start + 4

谁能帮帮我? 提前致谢

Fabric 和 Xcode 10 beta 5 存在一个错误,阻止在真实设备上构建,但您可以在模拟器上构建,升级到 Xcode 10 beta 6,这个错误应该被修复