firebase-unity-sdk icon indicating copy to clipboard operation
firebase-unity-sdk copied to clipboard

[Bug] firebase doesn't select app by package name

Open hoainam1593 opened this issue 7 months ago • 1 comments

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!

hoainam1593 avatar Jul 05 '24 05:07 hoainam1593