How can I sign in with the Google SignIn SDK in a sharing extension?

310 Views Asked by At

I have successfully signed in using the Google Sign-In SDK for iOS in my main app. However when I call hasAuthIKeyChain() from my sharing extension, it always returns false. Ideally, once the user has authenticated in the main app, I would like to call signInSilently() in my sharing extension to use the cached credentials.

Based on this question about using the Google+ Sign-In SDK, I enabled keychain sharing for both my app and my sharing extension, and set the same keychain group for both. Unfortunately, this didn't help. One difference is that I don't see an option to specify the keychain name to use with the Google Sign-In SDK, though.

What do I need to do in order to share Google Sign-In credentials between my main app and my sharing extension?

0

There are 0 best solutions below