iOS 9 Facebook login simulator -canOpenURL: failed for URL: "fbauth2:///" - error: "(null)" iOS 9 Facebook login simulator -canOpenURL: failed for URL: "fbauth2:///" - error: "(null)" ios ios

iOS 9 Facebook login simulator -canOpenURL: failed for URL: "fbauth2:///" - error: "(null)"


Why do I see console messages like 'canOpenURL: failed for URL: "fb...://' or ?

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


After you have updated your App's .plist file with the LSApplicationQueriesSchemes array, which you seem to have already done:

Next, verify that your Facebook SDK is version 4.6.0. Follow the Facebook directions if it's not.

Lastly, which is probably where the problem arises, is to Reset your Simulator's content and settings

To Reset your Simulator:

  1. Choose Simulator
  2. Select Reset Content & Settings
  3. and the Reset option

Apple's Simulator, even the IDE, will have bugs and closing and reopening, along with reseting the simulator, are always something to consider early on in your search for a solution.

Hope this helps!