invertase / flutterfire_cli

A CLI to help with using FlutterFire in your Flutter applications.
Apache License 2.0
164 stars 47 forks source link

[bug]: PlatformDirectoryDoesNotExistException while using a different project structure #140

Open cs-marcoblagoiev opened 1 year ago

cs-marcoblagoiev commented 1 year ago

Is there an existing issue for this?

CLI Version

0.2.7

Firebase Tools version

11.19.0

Flutter Doctor Output

[✓] Flutter (Channel stable, 3.3.9, on macOS 13.0.1 22A400 darwin-arm, locale en-GB) • Flutter version 3.3.9 on channel stable at /Users/user/flutter/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision b8f7f1f986 (6 weeks ago), 2022-11-23 06:43:51 +0900 • Engine revision 8f2221fbef • Dart version 2.18.5 • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at /Users/user/Library/Android/sdk • Platform android-33, build-tools 31.0.0 • ANDROID_HOME = /Users/user/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866) • 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 2021.3) • Android Studio at /Applications/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 • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] IntelliJ IDEA Community Edition (version 2021.2.3) • IntelliJ at /Applications/IntelliJ IDEA CE.app • 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

[✓] VS Code (version 1.74.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension can be installed from: 🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (2 available) • macOS (desktop) • macos • darwin-arm64 • macOS 13.0.1 22A400 darwin-arm • Chrome (web) • chrome • web-javascript • Google Chrome 108.0.5359.124

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

• No issues found!

Description

flutterfire configure command fails when using a project structure similar to the mutiple_flutters sample: https://github.com/flutter/samples/tree/main/add_to_app/multiple_flutters

Steps to reproduce

  1. Run command: flutterfire configure in the mutiple_flutters_module
  2. Select the correct Firebase project, platforms, and insert application ids
  3. Following error occurs:
Unhandled exception:
PlatformDirectoryDoesNotExistException: platform directory /Users/user/project/mutiple_flutters_module/ios does not exist. Please re-run after initializing this directory with Flutter.
#0      FirebaseAppIDFile.write (package:flutterfire_cli/src/firebase/firebase_app_id_file.dart:54:7)
#1      ConfigCommand.run (package:flutterfire_cli/src/commands/config.dart:486:31)
<asynchronous suspension>
#2      CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#3      main (file:///Users/user/.pub-cache/hosted/pub.dartlang.org/flutterfire_cli-0.2.7/bin/flutterfire.dart:57:5)
<asynchronous suspension>

Expected behavior

flutterfire configure runs successfully

Screenshots

No response

Additional context and comments

It seems that the configure command expects the "ios" folder to be placed at a standard path, but using a project structure similar to the one in the multiple_flutters example will not have the "ios" folder in this location.

rafaeldecker commented 1 year ago

Same issue happening here. Did you find some workaround?

cs-marcoblagoiev commented 1 year ago

Same issue happening here. Did you find some workaround?

No, I was not able to solve the issue

RajithaE-jan commented 1 year ago

Same issue here. Any new updates

russellwheatley commented 8 months ago

We currently don't support anything but the default project folder structure directory. Labelling this as an enhancement.