Skip to content
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

[New Release HERE!!!] Update native sdk version to 6.0.2 & REFECTOR iOS Adapter #205

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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. GoogleSignIn@JokeMaker.unitypackage.zip
It depends on EDM4U(aka. unity-jar-resolver).

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

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

GoogleSignIn@JokeMaker.unitypackage.zip
@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

GoogleSignIn@JokeMaker.unitypackage.zip @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.

@wjdwltn200
Copy link

안녕하세요, 이것을 빌드하려고 하는데 MrKhan과 비슷한 오류가 발생하는데 제 경우에는 다른 파일(GIDSignIn)이 있어서 새 프로젝트를 만들고 이 스레드에서 인용된 모든 항목을 가져오려고 했습니다. 6.0.2에서 6.2.4로 전환하더라도 여전히 발생합니다. Apple M1과 함께 macOS Ventura에서 최신 xcode를 사용하여 테스트하고 있습니다. 저는 Firebase를 사용하지 않고 GoogleSignIn만 사용하고 있습니다.
영상

안녕,@matbn 이전에 가져온 항목을 삭제한 다음 .unitypackage이 스레드에서 제공된 항목을 가져오나요?

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?

Hello I'm having the same problem. There is no problem with the Android build, but there was a problem during the iOS build process. I've been suffering from this problem for more than three days By any chance, is there a solution you can suggest? Please understand that I used a translator because I am not good at English.

@CodeMasterYi
Copy link
Author

@wjdwltn200 Remove all GoogleSignIn plugin files that you have imported into your project. Then DO what I say at the thread top.

@wjdwltn200
Copy link

@wjdwltn200 Remove all GoogleSignIn plugin files that you have imported into your project. Then DO what I say at the thread top.

Unfortunately, I've tried the method that you already suggested Unfortunately, it didn't work. However, it works fine on Android, so I'm trying to find a new way Thank you for your reply.

@Amrazyan
Copy link

@CodeMasterYi Hi, thank you on what you doing. I need some help
In android I'm importing the external dependency manager (via link that you provided)
then importing the package you provided here(GoogleSignin@JokerMaker)
Resolving
Importing GoogleSigninSample, putting my WebClientId
building successfully
but it throwing exception -> DeveoperError Exception of type 'Google.GoogleSignin+SigninException' was thrown

@Amrazyan
Copy link

Seems I needed to add my bundle id and generated SHA1 to google cloud

@Amrazyan
Copy link

I have another problem, seems the generated token is invalid, because after getting the IdToken I'm trying to test it in this link
https://oauth2.googleapis.com/tokeninfo?id_token=

but it gives me an error invalid_token

{
  "error": "invalid_token",
  "error_description": "Invalid Value"
}

@CodeMasterYi
Copy link
Author

@Amrazyan I'm so sorry for your problem. But I forget the details in which we make the google-signin actually work. That's ahout the project settings. Maybe you can google the solution out.
It would be appreciate if you tell me what's up when you work around the problem.

@Amrazyan
Copy link

The thing is that I tryed every possible solution, even chatgpt)) but still no luck,, I cant get valid token

@Amrazyan
Copy link

All the solutions is for only firebase auth, but not for unly using google cloud

@Amrazyan
Copy link

@CodeMasterYi I figure it out, this idToken is jwt token, so we need convert it to accesstoken to work, there is alot of examples in google on how to do that

@carlossalasamper
Copy link

carlossalasamper commented Jun 19, 2023

Hi! I've read all the comments in this PR but I'm getting this error when I use some native feature in Android:

DllNotFoundException: Unable to load DLL 'native-googlesignin'. Tried the load the following dynamic libraries: Unable to load dynamic library 'native-googlesignin' because of 'Failed to open the requested dynamic library (0x06000000) dlerror() = dlopen failed: library "native-googlesignin" not found at Google.Impl.GoogleSignInImpl.GoogleSignIn_Create (System.IntPtr data) [0x00000] in <00000000000000000000000000000000>:0 at Google.Impl.GoogleSignInImpl..ctor (Google.GoogleSignInConfiguration configuration) [0x00000] in <00000000000000000000000000000000>:0 at Google.GoogleSignIn.get_DefaultInstance () [0x00000] in <00000000000000000000000000000000>:0 at GamesMayer.SDK.GamesMayerAuth.SignInWithGoogle () [0x00000] in <00000000000000000000000000000000>:0 at GamesMayer.UI.SuperButton.Update () [0x00000] in <00000000000000000000000000000000>:0

I have imported only the package mentioned here:
#205 (comment)

UPDATED -> It's working!! I forgot to import the external resolver mentioned in the first comment of this PR.

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. GoogleSignIn@JokeMaker.unitypackage.zip It depends on EDM4U(aka. unity-jar-resolver).

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

@CodeMasterYi
Copy link
Author

@carlossalasamper glad that helps!

@cecilecabrera
Copy link

Getting this error when installing pods, do you guys know what I'm missing? Thanks!
image

@leezak5555
Copy link

Getting the same error. Any luck?

@way2tushar
Copy link

I can install pod by editing GoogleSignInDependencies.xml to
<iosPod name="GoogleSignIn" version="~> 7.0.0" bitcodeEnabled="false" minTargetSdk="6.0"> </iosPod>

But xcode shows this error. Any idea? @CodeMasterYi

Screenshot 2023-07-24 at 10 53 01 PM

@ingames
Copy link

ingames commented Jul 24, 2023

Hi @way2tushar ,
I've also changed 'GoogleSignIn' to '~> 7.0.0' in the pod and was able to fix the GTMSessionFetcher/Core issue.
And now I'm having the same problem as you in xCode.
#import <GoogleSignIn/GIDAuthentication.h> 'GoogleSignIn/GIDAuthentication.h' file not found
Please, does anyone know how to solve this? I really don't want to go back to Firebase 9.6

@ingames
Copy link

ingames commented Jul 25, 2023

@way2tushar
This has worked for me to be able to fix the problem and generate the xCode project correctly from Unity.
#225 (comment)

In my case I've only changed this path:
"/Users/{user}/.cocoapods/repos/cocoapods/Specs/d/4/0/GoogleSignIn/5.0.2/GoogleSignIn.podspec.json"
To
"/Users/{user}/.cocoapods/repos/cocoapods/Specs/d/4/0/GoogleSignIn/6.0.2/GoogleSignIn.podspec.json"

@devendraatxpertaapp
Copy link

@ingames Hi I am still stuck on this can you please explain bit more

Firebase version 10.11.0

GithubError

My Pod FIles

PodFiles

@way2tushar
Copy link

I fixed the issue by changing this file
"/Users/{user}/.cocoapods/repos/cocoapods/Specs/d/4/0/GoogleSignIn/6.0.2/GoogleSignIn.podspec.json"

change "GTMSessionFetcher/Core": "~> 1.1" under dependencies to "GTMSessionFetcher/Core": "< 4.0"

Screenshot 2023-07-29 at 4 47 50 PM

@ingames
Copy link

ingames commented Jul 29, 2023

@devendraatxpertaapp
I did this:
#205 (comment)

@devendraatxpertaapp
Copy link

@way2tushar @ingames
Thank you I finally solved it and did the same as you guys have mentioned.
USE this plugin https://github.com/googlesamples/google-signin-unity/files/10341935/GoogleSignIn%40JokeMaker.unitypackage.zip
Used external-dependency-manager-1.2.175 and it worked.

@Thaina
Copy link

Thaina commented Aug 21, 2023

OK. So it seem this repo is not maintain anymore? Even the fix pull request are not being merged for nearly 2 years

@CodeMasterYi
Copy link
Author

OK. So it seem this repo is not maintain anymore? Even the fix pull request are not being merged for nearly 2 years

Maybe they forget it or build another new one.

@furkanbct
Copy link

furkanbct commented Aug 24, 2023

image
image
When i click google sign in button unity shows this error. On ios build it crashes. Anyone have any ideas ?

@carlossalasamper
Copy link

We need a hero 🦸🏻‍♂️

@ArnauKokoro
Copy link

ArnauKokoro commented Sep 15, 2023

Using this package GoogleSignIn@JokeMaker.unitypackage.zip and changing ~> 6.0.2 to 6.2.4 on dependency file works for me!!

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. GoogleSignIn@JokeMaker.unitypackage.zip It depends on EDM4U(aka. unity-jar-resolver).

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

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.

@DulgiKim
Copy link

DulgiKim commented Sep 19, 2023

Recently, there was 7.0.0 version of GoogleSign-iOS. So I modified Dependecies (iosPods target version to > 6.0.2)
If you're using the latest Firebase plug-in, you have to do this because of GTMSessionFether and GTMAppAuth

Then, I found some functions are deleted, changed and GIDAuthentication header has been moved to private

Here's a modified package with googlesignin.mm file
GoogleSignIn.zip

@DarshanSahay
Copy link

@DulgiKim Thank you very much my friend. I have been trying to solve this issue past 10 hours straight. I wish i had seen your comment earlier. You are such a god send fellow. Thanks a lot.

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.

None yet