GIDSignIn钥匙串错误iOS 10 Xcode 8 [英] GIDSignIn keychain error iOS 10 Xcode 8

查看:232
本文介绍了GIDSignIn钥匙串错误iOS 10 Xcode 8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iOS 10和Xcode 8中,当我尝试登录Google服务时, 钥匙串错误"

In iOS 10 and xcode 8 when I try to sign in to google services I get "keychain error"

 func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!){
        if error != nil {
            print("\(error!.localizedDescription)")
}
}

在SO上提供并接受的解决方案是直接从模拟器运行应用程序,而不是通过Xcode运行.我已经尝试过并且没有成功,因此在这里发布了这个问题,希望有人能有更多最新的解决方案或经验.

Offered and accepted solutions on SO are to run the app direct from simulator and not via Xcode. This I have tried and have had no success hence posting this question here in the hope someone has a more recent solution or experience.

推荐答案

您要解决的问题与钥匙串访问有关.要解决此问题,您只需转到目标"->功能"并启用钥匙串共享.在此处.

The problem you are trying to solve is connected with keychain access. To fix issue you simply should go to Target->Capabilities and enable keychain sharing. Similar case with Facebook SDK is desribed here.

如果您使用的是 Xamarin (有关详细信息,请阅读此链接),谢谢@dynamokaj ):

If you are using Xamarin (read this link for more information, thanks @dynamokaj):

只需确保在权利"中启用了钥匙串访问权限,然后 还要选择Simulator(Debug)构建的权利.默认情况下 没有设置.

Just make sure you enable the keychain access in Entitlements and select the entitlements for Simulator (Debug) builds too. By default this is not set.

这篇关于GIDSignIn钥匙串错误iOS 10 Xcode 8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆