我已将FacebookSDK iOS v4.28安装到Xcode 9中,并使用FBSDKLoginButtonDelegate添加了自定义Facebook登录按钮。按下按钮时,它将运行此功能:
func handleFacebookLogin() {
FBSDKLoginManager().logIn(withReadPermissions: ["email", "public_profile"], from: self { (result, err) in
... code ...
}
}
调用此函数时,会导致NSException类型的未捕获异常。这是_11_dispatch_once [inlined]代码:
Grouphack`+[FBSDKInternalUtility isFacebookAppInstalled]:
0x1002e2868 <+0>: stp x20, x19, [sp, #-0x20]!
0x1002e286c <+4>: stp x29, x30, [sp, #0x10]
0x1002e2870 <+8>: add x29, sp, #0x10 ; =0x10
0x1002e2874 <+12>: mov x19, x0
0x1002e2878 <+16>: nop
0x1002e287c <+20>: ldr x8, #0x5ffc4 ; isFacebookAppInstalled.onceToken
0x1002e2880 <+24>: cmn x8, #0x1 ; =0x1
0x1002e2884 <+28>: b.ne 0x1002e28a8 ; <+64> [inlined] _dispatch_once at FBSDKInternalUtility.m:493
0x1002e2888 <+32>: nop
0x1002e288c <+36>: ldr x1, #0x59fc4 ; "_canOpenURLScheme:"
0x1002e2890 <+40>: adr x2, #0x49908 ; @"fbauth2"
0x1002e2894 <+44>: nop
0x1002e2898 <+48>: mov x0, x19
0x1002e289c <+52>: ldp x29, x30, [sp, #0x10]
0x1002e28a0 <+56>: ldp x20, x19, [sp], #0x20
0x1002e28a4 <+60>: b 0x10030c56c ; symbol stub for: objc_msgSend
0x1002e28a8 <+64>: adr x0, #0x5ff98 ; isFacebookAppInstalled.onceToken
0x1002e28ac <+68>: nop
0x1002e28b0 <+72>: adr x1, #0x42790 ; __block_literal_global.286
0x1002e28b4 <+76>: nop
0x1002e28b8 <+80>: bl 0x10030c434 ; symbol stub for: dispatch_once
0x1002e28bc <+84>: b 0x1002e2888 ; <+32> at FBSDKInternalUtility.m:496
控制台中未提供其他信息。 这个例外的原因是什么?