-->

Unable to sign in to Google from the GooglePlusSam

2020-08-10 07:43发布

问题:

I am running the GooglePlusPlatform Sample Code provided by Google to learn about its SDk. However, when I run the application and click on the sign-in button it generates an error as:

Error Domain=com.google.GooglePlusPlatform Code=-1 "keychain error" UserInfo=0x1100bdd0 {NSLocalizedDescription=keychain error}

Same error also occurs in another application I have created which uses the GooglePlus Sign in. I Googled about it, but could not find anything useful. Please help!

回答1:

Go to TARGETS > Capabilities > and enable "KeyChain Sharing".



回答2:

I actually filed this bug on the Google Services GitHub repo, and got responses from the coders sayings that it´s an Apple Bug and there´s nothing they can do about it.

https://github.com/googlesamples/google-services/issues/82

Good news is, that the problem only happens when Xcode is attached to the phone. It works fine otherwise. So even though it's a pain to test, we shouldn't worry about it being a problem for end users. (fingers crossed)



回答3:

I see this is not happening in simulator. And on real devices, this happens only when exception break point is created. Just remove that break point and try. It should work.