Skip to content

Change iOS plugin so compiles for Xcode 11 #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
9 changes: 0 additions & 9 deletions GoogleSignInPlugin/Assets/Parse.meta

This file was deleted.

30 changes: 0 additions & 30 deletions GoogleSignInPlugin/Assets/Parse/LICENSE

This file was deleted.

10 changes: 0 additions & 10 deletions GoogleSignInPlugin/Assets/Parse/LICENSE.meta

This file was deleted.

9 changes: 0 additions & 9 deletions GoogleSignInPlugin/Assets/Parse/Plugins.meta

This file was deleted.

Binary file not shown.
36 changes: 0 additions & 36 deletions GoogleSignInPlugin/Assets/Parse/Plugins/Unity.Compat.dll.meta

This file was deleted.

Binary file not shown.
36 changes: 0 additions & 36 deletions GoogleSignInPlugin/Assets/Parse/Plugins/Unity.Tasks.dll.meta

This file was deleted.

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 @@ -21,6 +21,8 @@

#import <memory>

#import "UnityAppController.h"

// These values are in the Unity plugin code. The iOS specific
// codes are mapped to these.
static const int kStatusCodeSuccessCached = -1;
Expand Down Expand Up @@ -105,9 +107,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 @@ -226,6 +225,7 @@ bool GoogleSignIn_Configure(void *unused, bool useGameSignIn,
void *GoogleSignIn_SignIn() {
SignInResult *result = startSignIn();
if (!result) {
[GIDSignIn sharedInstance].presentingViewController = GetAppController().rootViewController;
[[GIDSignIn sharedInstance] signIn];
result = currentResult_.get();
}
Expand All @@ -239,7 +239,8 @@ bool GoogleSignIn_Configure(void *unused, bool useGameSignIn,
void *GoogleSignIn_SignInSilently() {
SignInResult *result = startSignIn();
if (!result) {
[[GIDSignIn sharedInstance] signInSilently];
[GIDSignIn sharedInstance].presentingViewController = GetAppController().rootViewController;
[[GIDSignIn sharedInstance] signIn];
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 @@ -113,11 +110,7 @@ - (BOOL)GoogleSignInAppController:(UIApplication *)app
[self GoogleSignInAppController:app openURL:url options:options];

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

Expand Down
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ task package_plugin () {
"-importPackage", jarresolver_package,
"-exportPackage",
"Assets/GoogleSignIn",
"Assets/Parse",
"Assets/PlayServicesResolver",
"Assets/Plugins",
"${exportPath}",
Expand Down