+[WXApi registerApp:universalLink:]为什么iOS调用直接崩溃?
发布于 6 年前 作者 fuyang 9904 次浏览 来自 官方Issues

编译没错,调用的时候崩溃


调用堆栈

*** First throw call stack:

(

0   CoreFoundation                      0x00007fff23baa1ee __exceptionPreprocess + 350

1   libobjc.A.dylib                     0x00007fff50864b20 objc_exception_throw + 48

2   CoreFoundation                      0x00007fff23bcb054 +[NSObject(NSObject) doesNotRecognizeSelector:] + 132

3   CoreFoundation                      0x00007fff23baef6c ___forwarding___ + 1436

4   CoreFoundation                      0x00007fff23bb10f8 _CF_forwarding_prep_0 + 120

5   HBuilder                            0x000000010c51f21b -[AppDelegate application:didFinishLaunchingWithOptions:] + 1547

6   UIKitCore                           0x00007fff4756fa87 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 232

7   UIKitCore                           0x00007fff4757141f -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 3980

8   UIKitCore                           0x00007fff47576f6e -[UIApplication _runWithMainScene:transitionContext:completion:] + 1281

9   UIKitCore                           0x00007fff46cbc3ed -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 122

10  UIKitCore                           0x00007fff471a4aa9 _UIScenePerformActionsWithLifecycleActionMask + 83

11  UIKitCore                           0x00007fff46cbceff __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198

12  UIKitCore                           0x00007fff46cbc90e -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 296

13  UIKitCore                           0x00007fff46cbcd2c -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 818

14  UIKitCore                           0x00007fff46cbc5c1 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 345

15  UIKitCore                           0x00007fff46cc0bef __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 178

16  UIKitCore                           0x00007fff470ca9d7 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 865

17  UIKitCore                           0x00007fff471c2fa7 _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 240

18  UIKitCore                           0x00007fff46cc090a __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 153

19  UIKitCore                           0x00007fff471c2eaa _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 84

20  UIKitCore                           0x00007fff46cc0778 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 381

21  UIKitCore                           0x00007fff46b1ac67 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 657

22  UIKitCore                           0x00007fff46b197ec -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 248

23  UIKitCore                           0x00007fff46b1a991 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 210

24  UIKitCore                           0x00007fff475755cb -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 535

25  UIKitCore                           0x00007fff470ec535 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361

26  FrontBoardServices                  0x00007fff364e0361 -[FBSSceneImpl _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 442

27  FrontBoardServices                  0x00007fff365065f8 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke.154 + 102

28  FrontBoardServices                  0x00007fff364eae41 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 220

29  FrontBoardServices                  0x00007fff36506289 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke + 355

30  libdispatch.dylib                   0x000000011097ad6c _dispatch_client_callout + 8

31  libdispatch.dylib                   0x000000011097dcdd _dispatch_block_invoke_direct + 300

32  FrontBoardServices                  0x00007fff3652c49e __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30

33  FrontBoardServices                  0x00007fff3652c18c -[FBSSerialQueue _queue_performNextIfPossible] + 441

34  FrontBoardServices                  0x00007fff3652c69b -[FBSSerialQueue _performNextFromRunLoopSource] + 22

35  CoreFoundation                      0x00007fff23b0d271 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17

36  CoreFoundation                      0x00007fff23b0d19c __CFRunLoopDoSource0 + 76

37  CoreFoundation                      0x00007fff23b0c974 __CFRunLoopDoSources0 + 180

38  CoreFoundation                      0x00007fff23b0767f __CFRunLoopRun + 1263

39  CoreFoundation                      0x00007fff23b06e66 CFRunLoopRunSpecific + 438

40  GraphicsServices                    0x00007fff38346bb0 GSEventRunModal + 65

41  UIKitCore                           0x00007fff47578dd0 UIApplicationMain + 1621

42  HBuilder                            0x000000010c520c00 main + 112

43  libdyld.dylib                       0x00007fff516ecd29 start + 1

)

手动集成的weixinSDK,一开始还以为是other linker flag填写错误 加上了-ObjC -all_load都不行

2 回复

看crash堆栈并没有调用到WXApi的接口,确认是在registerApp:universalLink:发生crash?

解决了吗。我遇到同样的问题

回到顶部