I am doing simple login with facebook using parse for iOS 9 using Swift 2. I use ParseFacebookUtilsV4.framework from parse.
I have exactly followed instruction for iOS 9 from this link.
https://developers.facebook.com/docs/ios/ios9
Also, I am using Parse (v 1.8.5) Facebook (v 4.6). However, when I try to login like this,
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)")
} })
It crash like this. I also can't trace how and why it crash. How shall I solve?
+[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
I had this same issue. When I added this from the Facebook doc to my appliation Info.plist
file, it worked (under section 3, "If you're using v4.6.0 of the SDK, you only need to add:" part of 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>
More info about LSApplicationQueriesSchemes
* here and here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With