Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<!-- iOS Cocoapod dependencies can be specified by each iosPod element. -->
<iosPods>
<iosPod name="GoogleSignIn" version=">= 4.0.2" bitcodeEnabled="false"
<iosPod name="GoogleSignIn" version="~> 5.0.0" bitcodeEnabled="false"
minTargetSdk="6.0">
</iosPod>
</iosPods>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
*/
#import <GoogleSignIn/GIDSignIn.h>
@interface GoogleSignInHandler
: NSObject <GIDSignInDelegate, GIDSignInUIDelegate>
: NSObject <GIDSignInDelegate>

@end
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ - (void)signIn:(GIDSignIn *)signIn
case kGIDSignInErrorCodeKeychain:
currentResult_->result_code = kStatusCodeInternalError;
break;
case kGIDSignInErrorCodeNoSignInHandlersInstalled:
currentResult_->result_code = kStatusCodeDeveloperError;
break;
case kGIDSignInErrorCodeHasNoAuthInKeychain:
currentResult_->result_code = kStatusCodeError;
break;
Expand Down Expand Up @@ -192,6 +189,8 @@ bool GoogleSignIn_Configure(void *unused, bool useGameSignIn,
[NSString stringWithUTF8String:accountName];
}

[GIDSignIn sharedInstance].presentingViewController = UnityGetGLViewController();

return !useGameSignIn;
}

Expand Down Expand Up @@ -239,7 +238,7 @@ bool GoogleSignIn_Configure(void *unused, bool useGameSignIn,
void *GoogleSignIn_SignInSilently() {
SignInResult *result = startSignIn();
if (!result) {
[[GIDSignIn sharedInstance] signInSilently];
[[GIDSignIn sharedInstance] restorePreviousSignIn];
result = currentResult_.get();
}
return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ - (BOOL)GoogleSignInAppController:(UIApplication *)application
// Setup the Sign-In instance.
GIDSignIn *signIn = [GIDSignIn sharedInstance];
signIn.clientID = clientId;
signIn.uiDelegate = gsiHandler;
signIn.delegate = gsiHandler;

// looks like it's just calling itself, but the implementations were swapped
Expand All @@ -96,9 +95,7 @@ - (BOOL)GoogleSignInAppController:(UIApplication *)application
sourceApplication:sourceApplication
annotation:annotation];

return [[GIDSignIn sharedInstance] handleURL:url
sourceApplication:sourceApplication
annotation:annotation] ||
return [[GIDSignIn sharedInstance] handleURL:url] ||
handled;
}

Expand All @@ -112,12 +109,7 @@ - (BOOL)GoogleSignInAppController:(UIApplication *)app
BOOL handled =
[self GoogleSignInAppController:app openURL:url options:options];

return [[GIDSignIn sharedInstance]
handleURL:url
sourceApplication:
options[UIApplicationOpenURLOptionsSourceApplicationKey]
annotation:
options[UIApplicationOpenURLOptionsAnnotationKey]] ||
return [[GIDSignIn sharedInstance] handleURL:url] ||
handled;
}

Expand Down