从Xcode 10和iOS 12开始的Fabric Answer崩溃iOS应用程序

时间:2018-08-19 11:42:18

标签: ios xcode crash google-fabric xcode10

编辑

  

Xcode 10 beta 6解决了该问题


我正在使用新的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)  

我还按照指南中的说明添加了这段文字: Screenshot of Build Phase in Xcode 10

这是在AppDelegate.m中 Breakpoint

这是崩溃日志

  

线程0名称:调度队列:com.apple.main-thread线程0   崩溃:0 libsystem_kernel.dylib 0x00000001fa545104    pthread_kill + 8 1 libsystem_pthread.dylib 0x00000001fa5c4a00 pthread_kill $ VARIANT $ armv81 + 296 2
  libsystem_c.dylib 0x00000001fa49cd78中止+ 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   应用程序: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场景:didUpdateWithDiff:transitionContext:完成:] + 368 29 UIKitCore 0x0000000226f56c10   -[UIApplication工作区:didCreateScene:withTransitionContext:完成:] + 540 30   UIKitCore 0x0000000226f883c8   -[UIApplicationSceneClientAgent场景:didInitializeWithEvent:完成:] + 364 31 FrontBoardServices     0x00000001fd3db890-[FBSSceneImpl   _didCreateWithTransitionContext:completion:] + 444 32 FrontBoardServices 0x00000001fd3e6658 __56- [FBSWorkspace   客户: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开始+ 4

有人可以帮助我吗? 预先感谢

1 个答案:

答案 0 :(得分:5)

Fabric和Xcode 10 beta 5中存在一个错误,该错误阻止在真实设备上进行构建,但是您可以在模拟器上进行构建,升级到Xcode 10 beta 6后,该错误应得到解决