I've updated to Xcode 7 and the latest iOS SDK. I've added the appropriate entries in my app's plist:
My app's Facebook login works fine on device. However, on iOS 9 simulator, I'm getting:
-canOpenURL: failed for URL: "fbauth2:///" - error: "(null)"
And login is not working. I've seen facebook login issue - canOpenURL: failed for URL: "fbauth2:///" - error: "(null)" but I have FBSDKCoreKit framework. I've also seen Facebook SDK 4.5 IOS 9 but it's answer doesn't solve my problem.
Why am I getting this error on simulator and not on device even though I've done the checklist at https://developers.facebook.com/docs/ios/ios9?
This is an Xcode warning indicating the the canOpenURL: call returned false. As long as you have configured the
LSApplicationQueriesSchemes
entry in your plist as described above, you can ignore this warning.
This is not a problem. The FB SDK is trying to open the native facebook app which has the fbauth2:// url type. In Simulator its not available, so its just putting a log that it could not open the native Facebook app. You can configure the Facebook acct in Simulator and then tell the FB Login button to use the native Facebook account instead of opening the web view. But Facebook contends that millions of people use Facebook in browser and so in iOS 9 they have used the new SFSafariViewController as the default behaviour for facebook logins even on devices. You can try to use the native Facebook and see if it works.
Check this link for the discussion.
https://www.facebook.com/login.php?next=https%3A%2F%2Fdevelopers.facebook.com%2Fbugs%2F786729821439894%2F%3Fsearch_id
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