Skip to content

Conversation

CodeMasterYi
Copy link

@CodeMasterYi CodeMasterYi commented Dec 16, 2021

Update native sdk version to latest & refactor iOS adapter!

before google's future new release(greater than 1.0.4 released in 2018), you guys can
try import this. [email protected]
It depends on EDM4U(aka. unity-jar-resolver).

https://github.com/CodeMasterYi/google-signin-unity/releases

Update 2025-08-14!!!

  1. Change iOS version to = 6.2.4!
  2. Do like this Change GTMSessionFetcher/Core from <3.0 to '<4.0' CocoaPods/Specs#14617, under ~/.cocoapods/repos/cocoapods/Specs/d/4/0/GoogleSignIn/6.2.4/GoogleSignIn.podspec.json
  3. I will upgrade the ios part to v8+ or even v9+ in the near future

Copy link

@collectivemass collectivemass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on iOS and works great! Many thanks

@CodeMasterYi
Copy link
Author

Tested on iOS and works great! Many thanks

Would you fire a new release?

@collectivemass
Copy link

collectivemass commented Oct 27, 2022 via email

@CodeMasterYi
Copy link
Author

I don't work for Google, can I do that?

On Thu, Oct 27, 2022 at 12:29 AM Spermoverflow @.> wrote: Tested on iOS and works great! Many thanks Would you fire a new release? — Reply to this email directly, view it on GitHub <#205 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALIT6YXYJDKFRSKV6DKDP3WFIVMPANCNFSM5KFHXUMA . You are receiving this because you commented.Message ID: @.>
-- Roger Miller | Collective Mass | 424 603 7827

Aha. I mistakenly thought you work for Google~

@karstenkx
Copy link

karstenkx commented Dec 14, 2022

This could help me and my guys but I have a hard time to build this, I am not much in Java anymore since C# exists, can anyone tell me what to do to build this? I tried on Windows WSL 2 and got the below error.

winux@MSIGF63:~/gis/google-signin-unity$ ./build_all.sh --scan
~/gis/google-signin-unity ~/gis/google-signin-unity

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine java version from '11.0.17'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org
~/gis/google-signin-unity
winux@MSIGF63:~/gis/google-signin-unity$ sudo update-alternatives --config java
There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java-11-openjdk-amd64/bin/java
Nothing to configure.
winux@MSIGF63:~/gis/google-signin-unity$

thanks for any help

Edit1: After following this guide https://www.javaprogramto.com/2021/11/could-not-determine-java-version.html
I stuck now with

winux@MSIGF63:~/gis/google-signin-unity$ ./build_all.sh --scan
~/gis/google-signin-unity ~/gis/google-signin-unity

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':native-googlesignin'.
> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 0s
~/gis/google-signin-unity
winux@MSIGF63:~/gis/google-signin-unity$

gradle version is at 5.4.1

About that sdk issues there is an addon to the readme in this fork https://github.com/wakawa2003/google-signin-unity-fixed
It would be really great if someone could build this and put it somewhere to download for everyone

@CodeMasterYi
Copy link
Author

CodeMasterYi commented Dec 16, 2022

This could help me and my guys but I have a hard time to build this, I am not much in Java anymore since C# exists, can anyone tell me what to do to build this? I tried on Windows WSL 2 and got the below error.

winux@MSIGF63:~/gis/google-signin-unity$ ./build_all.sh --scan
~/gis/google-signin-unity ~/gis/google-signin-unity

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine java version from '11.0.17'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org
~/gis/google-signin-unity
winux@MSIGF63:~/gis/google-signin-unity$ sudo update-alternatives --config java
There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java-11-openjdk-amd64/bin/java
Nothing to configure.
winux@MSIGF63:~/gis/google-signin-unity$

thanks for any help

Edit1: After following this guide https://www.javaprogramto.com/2021/11/could-not-determine-java-version.html I stuck now with

winux@MSIGF63:~/gis/google-signin-unity$ ./build_all.sh --scan
~/gis/google-signin-unity ~/gis/google-signin-unity

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':native-googlesignin'.
> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 0s
~/gis/google-signin-unity
winux@MSIGF63:~/gis/google-signin-unity$

gradle version is at 5.4.1

About that sdk issues there is an addon to the readme in this fork https://github.com/wakawa2003/google-signin-unity-fixed It would be really great if someone could build this and put it somewhere to download for everyone

So sorry for the inconvenience.
But you should not build it yourself and you can do following this:

  1. import package @ here first https://github.com/googlesamples/google-signin-unity/releases/tag/v1.0.4
  2. modify the files that included in this PR

If it works, it would be nice to let me know. @karstenkx

@karstenkx
Copy link

karstenkx commented Dec 17, 2022

If it works, it would be nice to let me know. @karstenkx

Yes, in the end It worked when I installed that stone old "latest" release and then use the files in your PR , put them into the project overwritting , we both know a proper build and package release would be better

@CodeMasterYi
Copy link
Author

If it works, it would be nice to let me know. @karstenkx

Yes, in the end It worked when I installed that stone old "latest" release and then use the files in your PR , put them into the project overwritting , we both know a proper build and package release would be better

@karstenkx
I'm sorry for that.
I havent tried to rebuild a new package release.
I dont work for google.
I just provide a patch fix for some else to work around the not up to date issue.
If you have time to do so, that would be wonderful.
Nice day!

@MrKhan2022
Copy link

Guy i need a help i am getting this error
'GoogleSignIn/GIDAuthentication.h' file not found
Screenshot 2022-12-19 at 6 08 44 PM

@MrKhan2022
Copy link

Guy i need a help i am getting this error 'GoogleSignIn/GIDAuthentication.h' file not found Screenshot 2022-12-19 at 6 08 44 PM

image

@Crazak
Copy link

Crazak commented Dec 19, 2022

Having the same issue as @MrKhan2022. I'm pretty sure it was working a few days ago. Any help would be appreciated.

Edit: If anyone still struggling with this, changing the dependency version from >=6.0.2 to =6.2.4 solved it for me.

@CodeMasterYi
Copy link
Author

CodeMasterYi commented Dec 22, 2022

Having the same issue as @MrKhan2022. I'm pretty sure it was working a few days ago. Any help would be appreciated.

Edit: If anyone still struggling with this, changing the dependency version from >=6.0.2 to =6.2.4 solved it for me.

@Crazak Glad to hear that you have work around the issue.

Edit: May I have your unity version and xcode version(with macos version)?

@MrKhan2022
Copy link

Unity Version: 2021.3.8f1
Xcode version: 13.2.1
MacOs: macOS Big Sur version 11.7.1
@CodeMasterYi

@Amrazyan
Copy link

Amrazyan commented Jan 1, 2023

Guys please help me, still getting error like @MrKhan2022 described

@Amrazyan
Copy link

Amrazyan commented Jan 1, 2023

Screen Shot 2023-01-01 at 12 41 24

.

@CodeMasterYi
Copy link
Author

Guys please help me, still getting error like @MrKhan2022 described

I cant find clientID, uiDelegate and delegate in my implementation.

@CodeMasterYi
Copy link
Author

[email protected]
@Amrazyan unzip this file and try import this unity package that modified by me.

@matbn
Copy link

matbn commented Jan 10, 2023

Hi, I'm trying to build this, but I'm having a similar error to MrKhan, but in my case is another file (GIDSignIn), I've tried creating a new project and importing everything cited on this thread, but it still happens, even switch from 6.0.2 to 6.2.4.
I'm testing using the latest xcode with macOS Ventura, with an apple M1.
I'm not using Firebase, just the GoogleSignIn.

image

@CodeMasterYi
Copy link
Author

Hi, I'm trying to build this, but I'm having a similar error to MrKhan, but in my case is another file (GIDSignIn), I've tried creating a new project and importing everything cited on this thread, but it still happens, even switch from 6.0.2 to 6.2.4. I'm testing using the latest xcode with macOS Ventura, with an apple M1. I'm not using Firebase, just the GoogleSignIn.

image

hi, @matbn
do you delete what you import before and then import the .unitypackage provided in this thread?

@matbn
Copy link

matbn commented Jan 11, 2023

@CodeMasterYi yes, and I've also tried with a fresh project too, just importing the plugin-1.0.4, your files and the sample scene

@CodeMasterYi
Copy link
Author

CodeMasterYi commented Jan 12, 2023

@CodeMasterYi yes, and I've also tried with a fresh project too, just importing the plugin-1.0.4, your files and the sample scene

[email protected] @Amrazyan unzip this file and try import this unity package that modified by me.

hi @matbn
what about only importing the .unitypackage file provided in this thread?
this package is exported from my project which is working well.

one more thing, it depends this plugin https://github.com/googlesamples/unity-jar-resolver/releases/tag/v1.2.175
and this plugin depends on cocopods which downloads the remote dependencies on iOS Player.

@matbn
Copy link

matbn commented Jan 13, 2023

@CodeMasterYi using only your package with the jar resolver I could build, thank you for the help and for the updates.
I still haven't tried the sign-in cause I'm having a little problem with the plist thing (kinda new to apple), but will update after fix this.

@CodeMasterYi
Copy link
Author

@matbn Glad to hear that.
If there is any problem about this package, let me know.

@CodeMasterYi
Copy link
Author

Getting this error for Google Sign-in after updating my unity project to support 16KB pages.

How? @DhawalJhaveri

@DhawalJhaveri
Copy link

DhawalJhaveri commented Sep 23, 2025

@CodeMasterYi I updated the Firebase version from 12.9.0 to 13.2.0 along with the Google AdMob to 10.4.2 to support the 16KB memory pages for my project. I didn't find any new versions for the Google Sign-in which do the same so I tried running the project and when I made an attempt to sign in that was the error I got. I am on version 1.0.4 for Google sig-in but I think it does not support the 16 KB memory pages. If there's any work around for this then it will be really appreciated. I tried testing it on Android 13 and Android 15 but they both show the same error.

@CodeMasterYi
Copy link
Author

@DhawalJhaveri I have just build a new version for 16kb-page-size, but I haven't test it yet.
https://github.com/CodeMasterYi/google-signin-unity/tree/feature_AGPUpgrade/1.0.4.2
replace this 3 files under Assets\GoogleSignIn\Editor\m2repository\com\google\signin\google-signin-support\1.0.4, resolve the android dependency and make sure aar file updated under Assets\GeneratedLocalRepo\GoogleSignIn\Editor\m2repository\com\google\signin\google-signin-support\1.0.4(if it exists).

@DhawalJhaveri
Copy link

@CodeMasterYi let me know when you have had the chance to test it. I'll do the same from my side.

@CodeMasterYi
Copy link
Author

CodeMasterYi commented Sep 23, 2025

@DhawalJhaveri Great! but I have no time for coming days. I have a long TODO list. It will be really appreciated if you have time to do that test. Previous repo link shows my upgraded project for building a new Android release. If you have question about it, contact me anytime.

@DhawalJhaveri
Copy link

DhawalJhaveri commented Sep 23, 2025

@CodeMasterYi I did a test after replacing those three files but I'm still getting the same error. I'll go through the whole repo to make sure I'm not missing anything else.

@Thaina
Copy link

Thaina commented Sep 23, 2025

@DhawalJhaveri Have you tried my repo yet?

@DhawalJhaveri
Copy link

@Thaina Please share the link and let me know what to keep in mind when using the repo.

@Thaina
Copy link

Thaina commented Sep 24, 2025

@DhawalJhaveri https://github.com/thaina/google-signin-unity/?tab=readme-ov-file#forked-to-upgrade-base-library-to-newer-version

What to keep in mind?

  • it use upm all the way down
  • In android it use credential manager, not the google signin. So behaviour is difference
    • Especially about silent signin
    • and between ios and android
  • has some problem in android 13 and below
  • signout logic is incomplete

@DhawalJhaveri
Copy link

@Thaina Thanks for the update. I'll test this on my project and get in touch with you if anything new pops-up.

@BloodIcee
Copy link

@Thaina hi!
I’d like to switch to your Google Sign-In plugin, but I’m running into issues with removing the previous implementation.

Here’s the situation:

  • I had another GSI plugin working fine on Android.
  • Later I made some changes for iOS, but started getting a null auth code issue.
  • After that, I tried an Android build again, but the game now crashes when using the Google Sign-In method.
  • I even rolled back to a commit where everything worked on Android, but now I’m getting a Gradle error (without changing anything).

So my goal is to completely remove all traces of the old Google Sign-In plugin and set up your version from scratch.
Also, I noticed that the iOS Pod GoogleSignIn must be higher than version 7 in order for pod install to work.

Could you please provide some guidance or a step-by-step plan on how to clean up the old setup and properly integrate your plugin?
Thanks a lot!

@Thaina
Copy link

Thaina commented Sep 24, 2025

That would be sorry. I don't have any guideline. I just try to completely remove anything relate to old google signin manually

One method is, I would try reimport google signin, but not pressing import, just checking which files came from google signin unitypackage and remember path to remove it

@CodeMasterYi
Copy link
Author

@DhawalJhaveri I found that the old version supports 16kb. Your problem may be caused by other reason?
img_v3_02qf_c2e439ff-71f4-4ab5-8252-7e95e47ed4bg
img_v3_02qf_14c3ca41-c075-43ee-af4d-55088fa5eaeg

@DhawalJhaveri
Copy link

DhawalJhaveri commented Sep 25, 2025

@CodeMasterYi Cant seem to figure out the exact issue. I'll keep looking till I figure it out. Also please share the link to the site in the third image.

@CodeMasterYi
Copy link
Author

@CodeMasterYi Cant seem to figure out the exact issue. I'll keep looking till I figure it out. Also please share the link to the site in the third image.

Do you mean this?
https://developer.android.com/guide/practices/page-sizes#windows-powershell_1

@CodeMasterYi
Copy link
Author

CodeMasterYi commented Sep 25, 2025

@DhawalJhaveri You should ensure that the libarary is included in the package.
One possible tip:
Maybe that was ignored by VCS(such as Subversion) when you uploading the imported plugin and you build on another device without that library.

@DhawalJhaveri
Copy link

DhawalJhaveri commented Sep 25, 2025

@CodeMasterYi I used the APK analyzer in Android Studio to check if the APK was including the Google Sign-in package but there was nothing related to it. The libs/arm64-v8a is missing the libnative-googlesignin.so file in the APK. This might be the reason why I'm getting the said error.

@BloodIcee
Copy link

@Thaina hi again. Removed GoogleSignIn, EDM. Imported yours with UPM. Resolved and now I cannot build my game. Unity version is 2022.3.44f1. Here is the error:
Note: ***\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Could not load custom lint check jar file ***.gradle\caches\transforms-3\cae55797de2b85017dea1286eb360cde\transformed\jetified-activity-1.8.0\jars\lint.jar
java.lang.UnsupportedClassVersionError: androidx/activity/lint/ActivityIssueRegistry has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
...
Could not load custom lint check jar file ***.gradle\caches\transforms-3\314fa4048d55c7414f5c82d08a7a1ad6\transformed\jetified-annotation-experimental-1.4.1\jars\lint.jar
java.lang.UnsupportedClassVersionError: androidx/annotation/experimental/lint/ExperimentalIssueRegistry has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
...

Is that a problem of JDK?

@Thaina
Copy link

Thaina commented Sep 26, 2025

I'm not sure, let's remove Library folder first

@BloodIcee
Copy link

I deleted Library folder, cleared cache of gradle, reinstalled Unity and project. Still get the same error

@Thaina
Copy link

Thaina commented Sep 26, 2025

Have you clear resolved library and using gradle system in project?

@Bodrihin
Copy link

I deleted Library folder, cleared cache of gradle, reinstalled Unity and project. Still get the same error

In project settings change minimum Api level to 24.
Also change build settings:
Screenshot 2025-09-26 at 14 39 24

@BloodIcee
Copy link

I think so. As I said, I deleted googlesignin, edm and reinstalled project at all. Before I had unitypackage signin. Now I used yours UPM packages. I didn't have LauncherManifest, but had LauncherGradleTemplate

@DhawalJhaveri
Copy link

@CodeMasterYi @Thaina Thanks for all your help, I finally solved the issue. All I had to do was keep the older versions of the plugins that i was using and just update the Unity Editor version. I went from using 6000.0.32f1 to 6000.0.58f1. After updating the editor I tried to add the latest versions of the plugins but was faced with the same issue, but after reverting back to the version where my game was properly working I made a build in 6000.0.58f1 and checked it out in APK analyzer first and then on my android device. Those test confirmed that Google Signin is now working for me.
Once again thank you very much for helping me out.

@CodeMasterYi
Copy link
Author

@BloodIcee Do you explicitly specify JDK version in your build.gradle? How do you build your app? Android Studio or just command line?

@BloodIcee
Copy link

@CodeMasterYi give me some time. I deleted EDM, GoogleSignIn and will reimport UPM again. Let me also add LauncherManifest as Bodrihin said and raise minimum target API to 24
I build game with unity build system

@CodeMasterYi
Copy link
Author

It's a common issue with JDK version.
It tells that you should use JDK 11, but 17 is in use. If you use Android Studio, download a version of openjdk 11 with it, and set to use it.
@BloodIcee

@BloodIcee
Copy link

@CodeMasterYi I use jdk which is installed by Unity. I also installed jdk 17, but it cannot be set in Unity 2022.3

@CodeMasterYi
Copy link
Author

CodeMasterYi commented Sep 26, 2025

@BloodIcee I think you are exporting Android project first? If so:
Set the JDK path to 11.
Maybe it is defined in gradle.properties.
You can search it to find how.

BTW
It's nothing to do with the plugin. And you can ask AI to solve it soon.

@Thaina
Copy link

Thaina commented Sep 27, 2025

@Bodrihin I have try to made a successful build in 2022.3.62f

I need to remove all these file in plugins folder, then regenerate it in 2022.3.62f

image

So, maybe gradle update and credential manager version was the cause? And we might just need newer version of unity to fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.