错误状态10814基本上发生在cantOpenUrl
,这是由facebook
打电话给url
使用参数fbauth2:/.正如建议的那样thread,打印发生在这个函数内部,所以你不能用它做任何事情
Apple 改变了 IOS 10 的工作方式。要解决此问题,您可以访问
目标 > 功能 > 启用Keychain
Sharing
Here is a screenshot from the same thread linked above
正如论坛的这篇文章中所发布的开发商 issues
问题在于FBSD登录管理器 , the 完成处理程序从未被调用过
so in debuging, the author放在断点 in "FBSDKLoginManager.m”位于“logInWithBehavior:(FBSDKLoginBehavior)loginBehavior” and 发现weakSelf变得为零并且无法调用“logInWithBehavior:serverConfiguration:服务器配置加载错误:”
- (void)logInWithBehavior:(FBSDKLoginBehavior)loginBehavior
{
__weak __typeof__(self) weakSelf = self;
[FBSDKServerConfigurationManager loadServerConfigurationWithCompletionBlock:^(FBSDKServerConfiguration *serverConfiguration, NSError *loadError) {
[weakSelf logInWithBehavior:loginBehavior serverConfiguration:serverConfiguration serverConfigurationLoadError:loadError];
}];
}
解决方案一:
Change FBSDK登录管理器变量作为属性而不是用作函数变量。确保,FBSDK登录管理器多变的必须活着直到完成处理程序调用
您可以打开-W隐式保留自我warning 如果您引用,则会收到警告self不小心掉进了一个街区。张贴在Github 问题
解决方案2:
您可以将这些添加到您的 plist 中
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>akamaihd.net</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>facebook.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>fbcdn.net</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
</dict>
</dict>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fb-messenger-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
</array>
并且还改变了应用程序代理如下
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return SDKApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions)
}
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool
{
return SDKApplicationDelegate.shared.application(app, open: url, options: options)
}
正如建议的author之后你可以运行你的swift3、SDK、ios10 on XCode8
另请检查author if the 谷歌分析通过设置在视图控制器的顶部添加自己的控制器
Setting “FirebaseAppDelegateProxy已启用” to "NO" in the -Info.plist解决了问题。
.
完整归属于forum以及论坛中提到的作者