Hi,
I'm just upgrading an app of mine from an older integration with Google Drive as my app no longer is allowed to connect to Google Drive using the old auth mechanism.
I've come across a bit of an issue however. I've narrowed it down quite a bit, and produced a very minimal repro here:
You can run this to see the issue for yourself.
Basically, I try to sign the user in when the View Controller first appears (It is a file browser based controller, allow the user to select a file from his/her Google Drive). This works fine at first, and used to work all the time with the old Google Drive integration I had.
Now, however, when a user signs in, segues back to the main view, decides to sign out, or otherwise becomes signed out of Google, and then segues back to the file selection view, the sign-in controller appears to attempt to be loaded but it just remains completely blank and there is no way back out of this situation. The app, appears hung.
Has anyone else had this problem, is it known?
I have found that by using a delay as shown below, the problem no longer occurs. As you can imagine, this isn't something I really want to do in my app, it feels fairly hacky.
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
GIDSignIn* signIn = [GIDSignIn sharedInstance];
signIn.delegate = self;
signIn.uiDelegate = self;
[signIn signIn];
});
This is happening with:
pod 'Google/SignIn', '~> 3.0.3'
on iPhone simulators, and on an actual iPhone 7. Not sure about other devices, though I'd imagine it's the same.
Any other suggestions for a clean workaround would be great. I do however want my view's behaviour to remain the same (Show Google Drive on Launch, sign in if not signed in)...
Let me know if this is not the correct forum to report this.
Thanks,
-Mark