firebase / firebase/firebase-unity-sdk

AppOptions.LoadFromJsonConfig() not working correctly on iOS

Open
#376 3 comments 0 reactions 0 assignees View on GitHub
api: core type: feature request
Dominant language
C#
Stars
320
Forks
60
Avg merge
13h 32m
Merged PRs (30d)
13

Description

**Overview:**
I guess the function call might technically be working. However, whilst the Android google-services.json works fine for Android, it throws the following error on iOS: "ERROR: Unable to configure Firebase app (Configuration fails. It may be caused by an invalid GOOGLE_APP_ID in GoogleService-Info.plist or set in the customized options.)"

Additionally, there's no way of downloading a valid google-services.json for iOS, plus the GoogleService-info.plist uses different names and structure to the google-services.json.

**Motivation:**
We need different firebase projects for development and live production environments so we can easily develop and test (f.ex) Remote Config structural changes without fear of breaking the game for our entire player base. In the longer term, we can envisage a use case for multiple firebase projects within the same game, so build-time substitution isn't a long-term solution.

**Suggest a fix:**
In descending order, my for a fix preference would be:
- Expose "google-services.json" download for iOS through the console.
- Implement AppOptions.LoadFromPlistConfig()
- Document the mapping between plist & json

[Note that we're currently using Firebase Unity v6.6.0 - if this is fixed in a later version, then apologies in advance, although I checked the release notes and there was nothing listed there addressing this issue]

Contributor guide

Open the contributing guide

Research direction

Start at AppOptions.LoadFromJsonConfig() and compare the expected google-services.json structure with GoogleService-Info.plist and the reported GOOGLE_APP_ID error on iOS. Confirm the supported configuration path and document or implement the selected plist/configuration behavior, then verify it with an iOS Unity build using separate development and production Firebase projects.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, ios, unity
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.