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

时间:2015-09-24 13:09:53

标签: ios facebook parse-platform facebook-login 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)")
        } })

它像这样崩溃。我也无法追踪它崩溃的原因和原因。我该如何解决?

+[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

1 个答案:

答案 0 :(得分:18)

我有同样的问题。当我将这个从Facebook文档添加到我的appliation Info.plist文件时,它有效(根据第3节,“如果你使用SDK的v4.6.0,你只需要添加:”{{3的一部分}}):

<key>LSApplicationQueriesSchemes</key>
<array>
        <string>fbapi</string>
        <string>fb-messenger-api</string>
        <string>fbauth2</string>
        <string>fbshareextension</string>
</array>

有关LSApplicationQueriesSchemes * https://developers.facebook.com/docs/ios/ios9here的更多信息。

  • 根据Stefan的评论编辑