[Bug] firebase doesn't select app by package name
Description
when google-services.json contains more than 1 app, firebase doesn't choose app base on package name, it always choose one of apps no matter what package name.
Reproducing the issue
- create an empty firebase project
- create 2 android apps with 2 different package name (1) and (2)
- create an empty unity project with package name (1)
- download google-services.json and place into unity project
- log Debug.LogError(FirebaseApp.DefaultInstance.Options.AppId); in script
- build apk (1)
- change package name to (2)
- build apk (2)
- run apk (1) => logcat will show appId of app (1)
- run apk (2) => logcat will show appId of app (1)
Firebase Unity SDK Version
12.1.0
Unity editor version
2022.3.17
Installation Method
Unity Package Manager
Problematic Firebase Component(s)
No response
Other Firebase Component(s) in use
No response
Additional SDKs you are using
No response
Targeted Platform(s)
Android
Unity editor platform
Windows
Scripting Runtime
Mono
Release Distribution Type
Pre-built SDK from https://firebase.google.com/download/unity
Relevant Log Output
No response
If using CocoaPods for Apple platforms, the project's Podfile.lock
Expand Podfile.lock snippet
👀 Replace this line with the contents of your Podfile.lock!
Thanks for reporting, @hoainam1593. I was able to reproduce the behavior. It looks like replacing the google-services.json will trigger to correct this behavior, but we shouldn't need to do so. That said, I'll go ahead and report this to our engineering team.
@argzdev The problem is still relevant
Hi @NikitaR2R, thanks for bringing this up to our attention. Our engineers are aware of the issue, however they're currently dealing with more prioritized bugs. We'll keep you folks updated once we have more information to share.