-
Notifications
You must be signed in to change notification settings - Fork 259
'You must specify |clientID| for |GIDSignIn|' #63
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
Comments
The clientId gets set here: Make sure it's actually being loaded from your plist here. You can set a breakpoint or add some debug logging to figure out what's going on. |
@doggan thank you, in my case the problem was in the plist's file name... When you downloads plist file from Google Console, it's name looks like 'client_xxxxxxxxxx.apps.googleusercontent.com.plist', but file name should be "GoogleService-Info.plist" |
ya, the plist needs to be called "GoogleService-Info.plist" and it needs to be added to the root of the xcode project. also you need to create a url scheme with the reverse client id. |
I have same issue. I tried to renaming downloaded plist to 'GoogleService-Info.plist'. Still there is issue ou must specify |clientID| for |GIDSignIn|. |
Has anyone solved this yet?? I'm having the issue now and I have GoogleService-Info.plist in my root with the client ID and the reverse client id.. |
This was a simple target membership issue in xcode for me. The GoogleService-Info.plist was in the root, but the Target Membership of it was just set to UnityFramework, when I included my build target 'Unity-iPhone' it all worked out |
@highpockets I am having the same issue, while trying Google Sign In in my iPhone, it is crashing with 'You must specify |clientID| for |GIDSignIn|'. ""but the Target Membership of it was just set to UnityFramework, when I included my build target 'Unity-iPhone' it all worked out"" Can you help me with it? |
Hi! |
@pmse18 sorry for the late reply!! Did you sort it out?? My explanation was pretty bare, but it’s just like @CyanDeveloper says |
does anyone know how can we do this through unity pbxproject? I am using cloud to build my project and facing the same crash issue. |
Thanks you for your comments.
It was realized auto Target Membership changing with bellow code.
|
Just learned that you also have to add an URL scheme to the app. This can be done here: The URL scheme is the same as the same as the Reverse Client ID. Guys, this is really f*** complex. |
An easier way to get the .plist into your Xcode project is to copy it to the using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
public static class GoogleSignInPostBuild {
[PostProcessBuild(999)]
public static void OnPostProcessBuild(BuildTarget buildTarget, string buildPath)
{
var projPath = buildPath + "/Unity-iPhone.xcodeproj/project.pbxproj";
var proj = new PBXProject();
proj.ReadFromFile(projPath);
var targetGuid = proj.GetUnityMainTargetGuid();
proj.AddFileToBuild(targetGuid, proj.AddFile("Data/Raw/GoogleService-Info.plist", "GoogleService-Info.plist"));
proj.WriteToFile(projPath);
}
} It copies the file to the root of the project and sets the correct target. If you do this and add the URL scheme as described above, you should be fine. |
Hello, i will talk about my Scenario, i spent 4 day to understand my issue. |
Full error from Xcode :
For now I am just build the demo scene provided from an empty project.
Nothing fency.
Unity Build Settings BundleId matches with the clients ID.
I made many client ID for different platform, tried all of them and always having the same error.

I edit the WebClientId from the Signing Sample Script from the demo scene.
Any idea what do I do wrong?....
Thank you! :)
The text was updated successfully, but these errors were encountered: