Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: firebase.json cannot handle flavors #158

Closed
1 task done
EArminjon opened this issue Mar 2, 2023 · 1 comment
Closed
1 task done

[bug]: firebase.json cannot handle flavors #158

EArminjon opened this issue Mar 2, 2023 · 1 comment
Assignees
Labels
bug Something isn't working triage

Comments

@EArminjon
Copy link

Is there an existing issue for this?

  • I have searched the existing issues.

CLI Version

0.3.0-dev.16

Firebase Tools version

9.23.1

Flutter Doctor Output

[✓] Flutter (Channel stable, 3.3.4, on macOS 13.2.1 22D68 darwin-arm, locale fr-FR)
• Flutter version 3.3.4 on channel stable at /Users/enguerrandarminjon/fvm/versions/3.3.4
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision eb6d86ee27 (5 months ago), 2022-10-04 22:31:45 -0700
• Engine revision c08d7d5efc
• Dart version 2.18.2
• DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/enguerrandarminjon/Library/Android/sdk
• Platform android-33, build-tools 30.0.3
• ANDROID_HOME = /Users/enguerrandarminjon/Library/Android/sdk
• ANDROID_SDK_ROOT = /Users/enguerrandarminjon/Library/Android/sdk
• Java binary at: /Users/enguerrandarminjon/Library/Java/JavaVirtualMachines/corretto-1.8.0_322/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment Corretto-8.322.06.1 (build 1.8.0_322-b06)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.11.3

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (version 2022.1)
• Android Studio at /Users/enguerrandarminjon/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9477386/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
✗ Unable to find bundled Java version.
• Try updating or re-installing Android Studio.

[✓] Connected device (3 available)
• SIMU IPHONE 14 PRO (mobile) • 23B8F2A1-1290-4948-92F1-50149FF75D26 • ios • com.apple.CoreSimulator.SimRuntime.iOS-16-2 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.2.1 22D68 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 110.0.5481.177

[✓] HTTP Host Availability
• All required HTTP hosts are available

! Doctor found issues in 1 category.

Description

{
  "flutter": {
    "platforms": {
      "ios": {
        "buildConfigurations": {},
        "targets": {
          "Runner": {
            "projectId": "my_project_id",
            "appId": "my_app_id",
            "uploadDebugSymbols": true,
            "serviceFileOutput": "ios/Firebase/clienta/GoogleService-Info.plist"
          }
        },
        "default": {}
      },
      "macos": {
        "buildConfigurations": {},
        "targets": {},
        "default": {}
      }
    }
  }
}

Steps to reproduce

Imagine having 2 flavors : clienta and clientb

$> flutterfire configure #followed by clienta settings
$> flutterfire configure #followed by clientb settings

Launch app as following :

$> flutter run -t lib/main_clienta --flavor clienta

As the last flutterfire configure the clientb, my clienta app will start with the wrong GoogleService-Info.plist, the firebase instance is the wrong one etc.

Expected behavior

I would see my app take the right GoogleService-Info.plist file.

Screenshots

No response

Additional context and comments

No response

@EArminjon
Copy link
Author

Problem solved : Must use ios-build-config flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

2 participants