google-signin-unity
google-signin-unity copied to clipboard
Can't build in iOS but in android works
I got this errors in xcode:
#import <GoogleSignIn/GIDSignIn.h> @interface GoogleSignInHandler : NSObject <GIDSignInDelegate, GIDSignInUIDelegate>
error 'Cannot find protocol declaration for 'GIDSignInUIDelegate'; did you mean 'GIDSignInDelegate'?' 2------ // Setup the Sign-In instance. GIDSignIn *signIn = [GIDSignIn sharedInstance]; signIn.clientID = clientId; signIn.uiDelegate = gsiHandler; signIn.delegate = gsiHandler;
error: 'Property 'uiDelegate' not found on object of type 'GIDSignIn *'; did you mean 'delegate'?'
3--------
- Handle the auth URL */
-
(BOOL)GoogleSignInAppController:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { BOOL handled = [self GoogleSignInAppController:application openURL:url sourceApplication:sourceApplication annotation:annotation];
return [[GIDSignIn sharedInstance] handleURL:url sourceApplication:sourceApplication annotation:annotation] ||
error: 'No visible @interface for 'GIDSignIn' declares the selector 'handleURL:sourceApplication:annotation:'
anybody knows what is the problem? have been all week trying to fix that... i want to cry :(
@mavc18 We too just ran into this exact same issue, I wonder if you have solved this by now?
You have to edit GoogleSignInDependencies.xml from
<iosPod name="GoogleSignIn" version=">= 4.0.2" bitcodeEnabled="false">
To
<iosPod name="GoogleSignIn" version="= 4.4.0" bitcodeEnabled="false">
This plugin does not support newer 5.x.x pod, so you have to pin pod version to latest 4.x.x version.
But then there is a bug where iOS version not always returning AuthCode and no one has a solution yet https://github.com/googlesamples/google-signin-unity/issues/66 So you might need to reconsider whether integrating this on iOS or not
You have to edit GoogleSignInDependencies.xml from
<iosPod name="GoogleSignIn" version=">= 4.0.2" bitcodeEnabled="false">
To
<iosPod name="GoogleSignIn" version="= 4.4.0" bitcodeEnabled="false">
This plugin does not support newer 5.x.x pod, so you have to pin pod version to latest 4.x.x version.
Lower versions of GoogleSignIn use UIWebView and apps using UIWebView are not accepted anymore on iOS, hence using 4.x.x is not a solution anymore, since they won't accept the build on App Store.
I have the same issue... if I fix the error from this topic, my app won't be accepted on App Store, if I fix the UIWebView error, then I will get the error from this topic.
It seems that the best solution for now (for me) is to completely remove the Google signin.
I am currently using this fork: https://github.com/lukezbihlyj/google-signin-unity
To get 5.x.x pod working.
I am currently using this fork: https://github.com/lukezbihlyj/google-signin-unity
To get 5.x.x pod working.
Ok so dumb question. What is the proper way to install this fork into project? Copying the folders in the GoogleSignInPlugin/assets folder and replacing existing files is resulting in errors.
Could you share the error message? I just moved files into the project. But we only use this plugin for iOS. On Android we request ID token via Play Games Plugin. The ID token obtained from both plugins are interchangeable.
"Assets\GoogleSignIn\Future.cs(72,40): error CS0433: The type 'TaskCompletionSource<T>' exists in both 'Unity.Tasks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51':
someone made a package to update the 1.04 GoogleSignIn using the Lukezbihlyj fork that I eneded up using to fix is but I had to revert my project back and then used the package to import. That ended up working. I got it from the comments here: https://github.com/googlesamples/google-signin-unity/pull/126
Google add Tasks.dll to support Unity targeting .Net 3.5 and it will cause duplication error on Unity with .Net 4.5 since Tasks are built-in in .Net 4.5. You can safely remove Task.dll if you are using .Net 4.5
Google add Tasks.dll to support Unity targeting .Net 3.5 and it will cause duplication error on Unity with .Net 4.5 since Tasks are built-in in .Net 4.5. You can safely remove Task.dll if you are using .Net 4.5
Thanks a lot!