firebase / quickstart-unity

Firebase Quickstart Samples for Unity
https://firebase.google.com/games
Apache License 2.0
819 stars 424 forks source link

The project's Bundle ID is inconsistent with either the Bundle ID in 'GoogleService-Info.plist', or the Bundle ID in the options if you are using a customized options #1332

Open freadam opened 1 year ago

freadam commented 1 year ago

I was trying to build a unity game and deploy it to both android and IOS. It uses firebase auth and realtime database to store user data. I used https://firebase.google.com/docs/unity/setup process. to build to both android and IOS. my android works fine. however I have been stuck on the IOS. I have Xcode 14.2 and cocoa pods 1.12.0 versions installed. I have checked the bundle identifier matches both the firebase project settings and in the Xcode project and the unity project as well. I have deleted the plist file several times and imported new ones same issue. clean the project and built the project again same issue.

Screenshot 2023-05-19 at 2 34 37 PM Screenshot 2023-05-19 at 2 40 05 PM Screenshot 2023-05-19 at 2 36 48 PM
AlmostMatt commented 1 year ago

Can you provide some additional information to help with troubleshooting?

For example, when I first open the Unity editor while having an incorrect bundle ID, I often see a popup window like this with an option to correct the bundle ID. But it looks like this is different wording than the error that you are encountering.

Screenshot 2023-05-19 at 4 23 45 PM
freadam commented 1 year ago

I am using firebase 11.0 sdk. the error happens after i build in the project in xcode and run the application on ios device. but I have found one mistake on my behalf I was using LoadFromJsonConfig to create firebase app apparently that was not correct. I have gone past that error. But here is the situation I have two firebase project. The first firebase project does authentication for multiple apps and the second project contains realtime database to store game data for that app. on the android version I use one Google-services.json string and used LoadFromJsonConfig (hence the error when trying to build on mac) for the second firebase I used FirebaseApp.Create. as I understand on IOS I have to use 2plist but I don't know how to configure them and what the situation will be after I built the unity project and opened it in xcode. I have seen some explanations of using multiple plist files but it is mostly for different environments such as one for dev another plist for release. in my case both plist files need to work for one environment and God forbid decide to use multiple environment I would have 4plist files.

RiffatIslam commented 6 months ago

facing same issue