Closed cuongHuuk closed 2 months ago
@cuongHuuk - do you have a firebase.json
file with FlutterFire configuration contained within it? It should look like this in the firebase.json file:
{
"flutter": {
"platforms": {
// FLUTTERFIRE CONFIGURATION
}
}
}
platforms
@russellwheatley yes I have, I can run android app without error. my file look like
The problem is the path to your firebase.json
. For some reason, it is /Volumes/Data/firebase.json
which is incorrect.
Check this script in you run build phases on Xcode:
It uses the SRCROOT
Xcode environment variable as your project path. For some reason, your project path is /Volumes/Data
.
To check what SRCROOT
is for your project do the following from the root of your flutter project in your terminal:
cd ios/
xcodebuild -showBuildSettings
This will print out all Xcode environment variables. Check what SRCROOT
looks like. For example, here is what mine looks like for project "sample":
It seems to me you're doing something unusual with your Flutter project that is outside the scope of FlutterFire CLI
SRCROOT
I think my SRCROOT is correct @russellwheatley
ah, it is because you have spaces in your file path. This PR ought to solve your problem I think: https://github.com/invertase/flutterfire_cli/pull/228
Is there an existing issue for this?
CLI Version
1.0.0
Firebase Tools version
13.7.1
Flutter Doctor Output
[✓] Flutter (Channel stable, 3.19.3, on macOS 14.4 23E214 darwin-arm64, locale en-VN) • Flutter version 3.19.3 on channel stable at /Applications/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision ba39319843 (6 weeks ago), 2024-03-07 15:22:21 -0600 • Engine revision 2e4ba9c6fb • Dart version 3.3.1 • DevTools version 2.31.1
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/nguyencuong/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874) • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15E204a • CocoaPods version 1.15.2
[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2023.2) • 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 17.0.9+0-17.0.9b1087.7-11185874)
[✓] VS Code (version 1.87.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 (5 available)
• SM N770F (mobile) • RF8N21H8TGX • android-arm64 • Android 13 (API 33) • sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 14 (API 34) (emulator) • Cuong’s iPhone (2) (mobile) • 886a1334c1c12e89a204e248adf297683eb6a842 • ios • iOS 16.7.7 20H330 • macOS (desktop) • macos • darwin-arm64 • macOS 14.4 23E214 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 123.0.6312.124
[✓] Network resources • All expected network resources are available.
Description
My app works well on android but it throws an error on ios:
Steps to reproduce
flutter run
Expected behavior
ios can run well as android
Screenshots
Additional context and comments
No response