Open chkuang-g opened 4 years ago
I was changing Application Id from the build script and game-services.xml
was not updated properly.
I think I fixed it and my current build script looks like this:
google-services.json
and GoogleService-Info.plist
to the Assets folder.AssetDatabase.Refresh();
(I am not sure if this is really needed);GenerateXmlFromGoogleServicesJson.ForceJsonUpdate(false)
to regenerate google-services.xml
Based on https://github.com/googlesamples/unity-jar-resolver/issues/365
The user request to be able to generate
google-services.xml
properly if they try to change application Id right before building. Ex.Currently
GenerateXmlFromGoogleServicesJson.cs
(in Firebase.Editor.dll) relies onPlayServicesResolver.BundleIdChanged
event to changegoogle-services.xml
when application id change. However, the event only triggered in the next update from the main thread. https://github.com/googlesamples/unity-jar-resolver/blob/825901fa297065d651709fdc34cc5433410c8869/source/AndroidResolver/src/PlayServicesResolver.cs#L1370@master-lincoln came up with a workaround to utilize reflection to force trigger this event
However, there should be a better way to support such case.