diff --git a/GoogleSignInPlugin/Assets/Parse.meta b/GoogleSignInPlugin/Assets/Parse.meta deleted file mode 100644 index 351c7ed2..00000000 --- a/GoogleSignInPlugin/Assets/Parse.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: d1a8f2ea2fc954f4db9d55a59d097a7d -folderAsset: yes -timeCreated: 1500403331 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/GoogleSignInPlugin/Assets/Parse/LICENSE b/GoogleSignInPlugin/Assets/Parse/LICENSE deleted file mode 100755 index 4abeb6e9..00000000 --- a/GoogleSignInPlugin/Assets/Parse/LICENSE +++ /dev/null @@ -1,30 +0,0 @@ -BSD License - -For Parse .NET SDK software - -Copyright (c) 2015-present, Parse, LLC. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name Parse nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/GoogleSignInPlugin/Assets/Parse/LICENSE.meta b/GoogleSignInPlugin/Assets/Parse/LICENSE.meta deleted file mode 100644 index f817f8d8..00000000 --- a/GoogleSignInPlugin/Assets/Parse/LICENSE.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 9dd0e3c9dea104831bc092afe2f6eb5e -labels: -- gvh -timeCreated: 1503959774 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/GoogleSignInPlugin/Assets/Parse/Plugins.meta b/GoogleSignInPlugin/Assets/Parse/Plugins.meta deleted file mode 100644 index 2b04519c..00000000 --- a/GoogleSignInPlugin/Assets/Parse/Plugins.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: aecfff8cf5706409e93b95c9c1081553 -folderAsset: yes -timeCreated: 1500403331 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/GoogleSignInPlugin/Assets/Parse/Plugins/Unity.Compat.dll b/GoogleSignInPlugin/Assets/Parse/Plugins/Unity.Compat.dll deleted file mode 100644 index 4b8c275e..00000000 Binary files a/GoogleSignInPlugin/Assets/Parse/Plugins/Unity.Compat.dll and /dev/null differ diff --git a/GoogleSignInPlugin/Assets/Parse/Plugins/Unity.Compat.dll.meta b/GoogleSignInPlugin/Assets/Parse/Plugins/Unity.Compat.dll.meta deleted file mode 100644 index da154d38..00000000 --- a/GoogleSignInPlugin/Assets/Parse/Plugins/Unity.Compat.dll.meta +++ /dev/null @@ -1,36 +0,0 @@ -fileFormatVersion: 2 -guid: 0983b695c3c6148a58a2163488772971 -labels: -- gvh -timeCreated: 1500403332 -licenseType: Pro -PluginImporter: - serializedVersion: 2 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - isOverridable: 0 - platformData: - data: - first: - Any: - second: - enabled: 1 - settings: {} - data: - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - data: - first: - Windows Store Apps: WindowsStoreApps - second: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: diff --git a/GoogleSignInPlugin/Assets/Parse/Plugins/Unity.Tasks.dll b/GoogleSignInPlugin/Assets/Parse/Plugins/Unity.Tasks.dll deleted file mode 100644 index a3a564f3..00000000 Binary files a/GoogleSignInPlugin/Assets/Parse/Plugins/Unity.Tasks.dll and /dev/null differ diff --git a/GoogleSignInPlugin/Assets/Parse/Plugins/Unity.Tasks.dll.meta b/GoogleSignInPlugin/Assets/Parse/Plugins/Unity.Tasks.dll.meta deleted file mode 100644 index a141b679..00000000 --- a/GoogleSignInPlugin/Assets/Parse/Plugins/Unity.Tasks.dll.meta +++ /dev/null @@ -1,36 +0,0 @@ -fileFormatVersion: 2 -guid: af535f85bedbe4425b5153ac2087c75e -labels: -- gvh -timeCreated: 1500403332 -licenseType: Pro -PluginImporter: - serializedVersion: 2 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - isOverridable: 0 - platformData: - data: - first: - Any: - second: - enabled: 1 - settings: {} - data: - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - data: - first: - Windows Store Apps: WindowsStoreApps - second: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: diff --git a/GoogleSignInPlugin/Assets/Plugins/iOS/GoogleSignIn/GoogleSignIn.h b/GoogleSignInPlugin/Assets/Plugins/iOS/GoogleSignIn/GoogleSignIn.h index 5e77bc10..410f23db 100644 --- a/GoogleSignInPlugin/Assets/Plugins/iOS/GoogleSignIn/GoogleSignIn.h +++ b/GoogleSignInPlugin/Assets/Plugins/iOS/GoogleSignIn/GoogleSignIn.h @@ -15,6 +15,6 @@ */ #import @interface GoogleSignInHandler - : NSObject + : NSObject @end diff --git a/GoogleSignInPlugin/Assets/Plugins/iOS/GoogleSignIn/GoogleSignIn.mm b/GoogleSignInPlugin/Assets/Plugins/iOS/GoogleSignIn/GoogleSignIn.mm index 9b82a370..5cffbc90 100644 --- a/GoogleSignInPlugin/Assets/Plugins/iOS/GoogleSignIn/GoogleSignIn.mm +++ b/GoogleSignInPlugin/Assets/Plugins/iOS/GoogleSignIn/GoogleSignIn.mm @@ -21,6 +21,8 @@ #import +#import "UnityAppController.h" + // These values are in the Unity plugin code. The iOS specific // codes are mapped to these. static const int kStatusCodeSuccessCached = -1; @@ -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; @@ -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(); } @@ -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; diff --git a/GoogleSignInPlugin/Assets/Plugins/iOS/GoogleSignIn/GoogleSignInAppController.mm b/GoogleSignInPlugin/Assets/Plugins/iOS/GoogleSignIn/GoogleSignInAppController.mm index 33631489..c4cbc551 100644 --- a/GoogleSignInPlugin/Assets/Plugins/iOS/GoogleSignIn/GoogleSignInAppController.mm +++ b/GoogleSignInPlugin/Assets/Plugins/iOS/GoogleSignIn/GoogleSignInAppController.mm @@ -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 @@ -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; } @@ -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; } diff --git a/build.gradle b/build.gradle index 50f8d7ec..9d47abbc 100644 --- a/build.gradle +++ b/build.gradle @@ -257,7 +257,6 @@ task package_plugin () { "-importPackage", jarresolver_package, "-exportPackage", "Assets/GoogleSignIn", - "Assets/Parse", "Assets/PlayServicesResolver", "Assets/Plugins", "${exportPath}",