google-signin-unity
google-signin-unity copied to clipboard
Update iOS pod to >= 5.0.0 and apply migrations for native plugin code.
Fixes for the updated GoogleSignIn iOS pod version 5.0.0+, see issue #122
Hey @lukezbihlyj ,
Does your PR fixes this issue?
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'You must specify |clientID| for |GIDSignIn|'
Thank you very much.
Hey @lukezbihlyj ,
Does your PR fixes this issue?
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'You must specify |clientID| for |GIDSignIn|'Thank you very much.
That issue usually happens occurs when the app can't find your GoogleService-Info.plist file. I have an editor script that imports the file into the XCode project after the build has completed using this line:
project.AddFileToBuild(targetGuid, project.AddFile(googleServiceInfoPlistPath, "GoogleService-Info.plist"));
Take a look at the Unity docs for how to use the PBXProject class and there are probably some more comprehensive examples on the Unity forums as well.
Thanks for the heads up, but I don't think thats my problem. I mean, I can see the GoogleService-Info.plist in xCode hierarchy. Do you have any other tip? Thanks again man!
Thanks for the heads up, but I don't think thats my problem. I mean, I can see the GoogleService-Info.plist in xCode hierarchy. Do you have any other tip? Thanks again man!
I haven't personally seen that problem unfortunately. You could try adding some logs in here to make sure that the ID is getting extracted properly from your plist file: https://github.com/googlesamples/google-signin-unity/blob/588c0637310623d86c55d06f0adc72972b0bac22/GoogleSignInPlugin/Assets/Plugins/iOS/GoogleSignIn/GoogleSignInAppController.mm#L68-L79
Thank you man. I am totally noob when it comes to native code, but I will figure it out. Thanks again!
Well... that was quick, I created some logs just like you said and you were right, it was not being attached to the build. After clicking the file in xCode I saw that the Target Membership of my app was not selected.
Thank you very much for helping me out man :)
@lukezbihlyj How to download your pull request as an unitypackage? or zip?
@ragavendranbala You can download my branch as a .zip from here: https://github.com/lukezbihlyj/google-signin-unity/archive/master.zip
Thank you so much for this! My app was getting rejected by Apple because of the ITMS-90809: UIWebView API Deprecation. v1.0.4 of this project uses GoogleSignIn v4.x.x which uses UIWebView. You need to run v5.0.0 or higher of GoogleSignIn. This pull request does that.
Admins, PLEASE merge this pull request. I'm a bit hesitant to include GoogleSignIn in my Unity project as this repo does not seem to be supported anymore. Hopefully people like lukezbihlyj and others will keep things working.
Thanks again
Thanks for your insights and initiative @lukezbihlyj!
Are you guys using Unity 2019.3? The Xcode project structure has changed as of Unity 2019.3 according to https://docs.unity3d.com/Manual/StructureOfXcodeProject.html.
When checking the contents of the .ipa file:

- Unity 2019.2:
GoogleSignIn.bundleandGoogleService-Info.plistwere under the root folder. - Unity 2019.3:
GoogleSignIn.bundleandGoogleService-Info.plistare now moved to a subfolder inside Frameworks
Perhaps this is causing the 'You must specify |clientID| for |GIDSignIn|' error & crash on iOS https://github.com/googlesamples/google-signin-unity/issues/63...
@ragavendranbala You can download my branch as a
.zipfrom here: https://github.com/lukezbihlyj/google-signin-unity/archive/master.zip
@lukezbihlyj Im sorry, Im really noob about xcode. I download your branch as a zip, but what should I do in Unity? is it only to copy the Assets folder from zip to Unity Assets and build xcode and thats it?
or is there anything else I should do in Xcode, or where do I download that GoogleSignIn pod 5,0?
thanks so much..
@pseudocolor
You don't need to download the project as a zip. You can just look at the diff in this PR and apply all the changes by hand. Also check your Podfile.lock that it has something like this
... indicating that your version is any version greater than 5.0.0. If that's not the case, open the Podfile and make sure it has pod 'GoogleSignIn', '>= 5.0.0' in it (change it if you need to). Then (after backing it up first, to be safe) delete your Podfile.lock and have Unity/Xcode (not sure which one actually) recreate it by kicking off another build. The Podfile.lock should now have a version like in the screenshot. I just did all this with success.
Big thanks to @lukezbihlyj !!
@lukezbihlyj since this project has been abandoned, maybe it's time to make a unofficial fork and provide a fixed unitypackage from there. I'll chip in $10 for the effort :)
@nicolasgramlich have you created the unity package?
@ragavendranbala sorry, I've never done that before and don't have the time for it while working on my game (shameless plug: https://play.google.com/store/apps/details?id=com.legioncommander ). If you have any problems let me know and I'll try to help out.
If you have any problems let me know and I'll try to help out.
@nicolasgramlich will try that this night, thanks
hey it worked!
thanks @lukezbihlyj , @nicolasgramlich
I just use what on the Assets folder of the zip in unity, but make sure your other sdk or unity package is safe. Unity ads is built in by default, and it should be upgraded first or just remove them since the default unity ads 2.0 on my Unity still use the uiwebview
I have created the unity package here because I have to import to many projects. Tell me if there is some bug and thanks @lukezbihlyj for his work. Link to the upgrade unity package: https://drive.google.com/file/d/1N50K62jLxORVTI5xSNEc06o0xyFh9mvu/view?usp=sharing
This update works well! Thanks for your efforts. However I'm coming across one problem. Those who have any idea to resolve this issue, please let me know. On every login, it is asking for permission. Sign-in silently function in android works well but in IOS, it gives the prompt for permission and upon approval, it leads to the google account and you have to choose your account everytime.
For reference, please look at this issue. Can it be because of changes made with this update? Please let me know the workaround. Issue 163
I think this PR must be merged into the main branch and release a new version. Without these changes, it's hard to build or submit to the AppStore.
Agreed - it is ridiculous that a company as large as Google can't find anyone in their staff to actively maintain their own sign in plugin. More likely is that no one in their management is even aware of the issue. https://github.com/addyosmani https://github.com/jkammerl https://github.com/nic0lette https://github.com/PaulRashidi https://github.com/samtstern https://github.com/shrugs https://github.com/thagikura https://github.com/yaraki ^ talk to your managers and make sure they get someone assigned to this.
@lukezbihlyj Google release 6.0.0 version recently, It seems couple of class removed/renamed.
Since Google published GoogleSignIn 6.0.0, GoogleSignInDependencies.xml file should be like
<iosPods>
<iosPod name="GoogleSignIn" version="~> 5.0.0" bitcodeEnabled="false"
minTargetSdk="6.0">
</iosPod>
</iosPods>
Notice the usage of ~>which means "take whatever starting from 5.0.0 until 6.0.0 (excluding 6.0.0)".
Since Google published GoogleSignIn 6.0.0, GoogleSignInDependencies.xml file should be like
<iosPods> <iosPod name="GoogleSignIn" version="~> 5.0.0" bitcodeEnabled="false" minTargetSdk="6.0"> </iosPod> </iosPods>Notice the usage of
~>which means "take whatever starting from 5.0.0 until 6.0.0 (excluding 6.0.0)".
Implemented this into my fork, sorry it took so long
This should really be merged in to the official repo! It works perfectly for me.
When will google merge this 🙄
see https://github.com/googlesamples/google-signin-unity/pull/205