我对使用iOS9和Xcode7的Facebook SDK4.6有一个问题。
在设备上测试时,当我单击登录按钮时没有任何反应,并且在iOS模拟器中收到一个错误。
2015-10-01 17:12:32.197 TestProject[32112:797172] -canOpenURL: failed for URL: "fbauth2:///" - error: "(null)"
在我的plist文件中,我包含了以下内容
<key>NSAppTransportSecurity</key>
<dict>
<!--Include to allow all connections (DANGER)-->
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbauth</string>
<string>fbapi</string>
<string>fb-messenger-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
</array>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb{FACEBOOK_APP_ID}</string>
</array>
</dict>
</array>
<key>FacebookAppID</key>
<string>{FACEBOOK_APP_ID}</string>
<key>FacebookDisplayName</key>
<string>{Your App Name}</string>
发布于 2016-02-26 02:40:34
这只是一个运行时警告,让您知道处理该方案的应用程序没有安装在手机上。
Facebook的文档甚至对此有一个注释:
这是一个Xcode警告,指示canOpenURL: call返回false。只要您已经如上所述在plist中配置了LSApplicationQueriesSchemes条目,您就可以忽略此警告
https://developers.facebook.com/docs/ios/ios9
你能分享你的AppDelegate代码和你尝试登录的代码吗?也许那里有什么东西..。
https://stackoverflow.com/questions/32883802
复制相似问题