iOS 9 Parse(v 1.8.5)Facebook(v 4.6)登录崩溃FBSDKInternalUtility checkRegisteredCanOpenURLScheme

Kha*_*inn 8 facebook ios facebook-login parse-platform swift2

我正在使用Swift 2使用解析iOS 9进行简单的登录.我使用解析时的ParseFacebookUtilsV4.framework.

我从这个链接完全遵循iOS 9的说明.

https://developers.facebook.com/docs/ios/ios9

另外,我正在使用Parse(v 1.8.5)Facebook(v 4.6).但是,当我尝试这样登录时,

    let permissions = ["user_about_me", "user_relationships", "user_birthday", "user_location"]

    PFFacebookUtils.logInInBackgroundWithReadPermissions(permissions, block: { (user: PFUser?, error: NSError?) -> Void in //switched ! to ?
        if user == nil {
            NSLog("Uh oh. The user cancelled the Facebook login.") }
        else if user!.isNew
        { //inserted !
            NSLog("User signed up and logged in through Facebook!")
        }
        else {
            NSLog("%@", error?.localizedDescription as String!)
            NSLog("User logged in through Facebook! \(user!.username)")
        } })
Run Code Online (Sandbox Code Playgroud)

它崩溃了.我也无法追踪它崩溃的原因和原因.我该如何解决?

+[FBSDKInternalUtility checkRegisteredCanOpenURLScheme:]:
0x10014ec04 <+0>:   stp    x22, x21, [sp, #-48]!
0x10014ec08 <+4>:   stp    x20, x19, [sp, #16]
0x10014ec0c <+8>:   stp    x29, x30, [sp, #32]
0x10014ec10 <+12>:  add    x29, sp, #32
0x10014ec14 <+16>:  sub    sp, sp, #16
0x10014ec18 <+20>:  mov    x20, x0
0x10014ec1c <+24>:  mov    x0, x2
0x10014ec20 <+28>:  bl     0x10020d6d0               ; symbol stub for: objc_retain
0x10014ec24 <+32>:  mov    x19, x0
0x10014ec28 <+36>:  adrp   x8, 341
0x10014ec2c <+40>:  ldr    x8, [x8, #3320]
0x10014ec30 <+44>:  cmn    x8, #1
0x10014ec34 <+48>:  b.ne   0x10014eccc               ; <+200> [inlined] _dispatch_once at
Run Code Online (Sandbox Code Playgroud)

zer*_*iff 18

我有同样的问题.当我将这个从Facebook文档添加到我的应用Info.plist程序文件时,它可以工作(根据第3节,"如果你使用SDK的v4.6.0,你只需要添加:" https://developers.facebook的一部分. com/docs/ios/ios9):

<key>LSApplicationQueriesSchemes</key>
<array>
        <string>fbapi</string>
        <string>fb-messenger-api</string>
        <string>fbauth2</string>
        <string>fbshareextension</string>
</array>
Run Code Online (Sandbox Code Playgroud)

有关LSApplicationQueriesSchemes*这里和这里的更多信息.

  • 根据Stefan的评论编辑