Repository navigation
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Description
Steps:
flutter create test_app --platforms iosandcd test_appflutter config --enable-swift-package-manager(because majority of my apps use it, or whatever reason)- Add
config: enable-swift-package-manager: falseto pubspec (with proper indentations of course) flutter pub add firebase_core- Run
flutter pub get.cd ios/ - Update the first line of
Podfileso that the minimum deployment target is "15.0", and uncomment the line (required by Firebase, unrelated to the bug). pod install. CheckPodfile.lock, it contains the FirebaseCore (because we get it through Cocoapods)cd ios(or any other directory within the app's directory other than it), runflutter pub get. The config is ignored. Regenerate Podfile from symlinks withpod install. The FirebaseCore was removed from the lock, as it's fetched from SwiftPM now and not Cocoapods 🙃
The lines below sound like they have some knowledge of why it's happening. It should check the manifest of the package closest in the directory tree, not the current directory.
flutter/packages/flutter_tools/lib/src/flutter_features_config.dart
Lines 32 to 33 in d693b4b
| // Can be null if no manifest file exists in the current directory. | |
| final FlutterManifest? _projectManifest; |
➜ ~ flutter --version
Flutter 3.35.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 05db968908 (5 weeks ago) • 2025-08-25 10:21:35 -0700
Engine • hash abb725c9a5211af2a862b83f74b7eaf2652db083 (revision a8bfdfc394) (1 months ago) • 2025-08-22 23:51:12.000Z
Tools • Dart 3.9.0 • DevTools 2.48.0
Reacted by Piotr Rogulski, Paweł Jakubowski, Dominik Roszkowski and thanhle1547
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Activity
[-]Flutter CLI ignores pubspec's config if current dir is not app's root.[/-][+]Flutter CLI ignores pubspec's SwiftPM enabled config if current dir is not app's root.[/+][-]Flutter CLI ignores pubspec's SwiftPM enabled config if current dir is not app's root.[/-][+]Flutter CLI ignores pubspec's SwiftPM enabled config if current dir is not app's root[/+]darshankawar commentedon Oct 1, 2025
Thanks for the detailed report. Upon following the steps, I see below in
podfile.lock:Keeping the issue open and labeing for team's tracking.
vashworth commentedon Oct 16, 2025
From triage: So this issue is not specific to SwiftPM. Any flutter feature enabled/disabled through the config will run into this problem.
Basically, if you're not in the root project directory, Flutter will attempt to change the working directory to the root project directory:
flutter/packages/flutter_tools/lib/src/runner/flutter_command.dart
Lines 1971 to 1983 in a873a27
Flutter features uses the FlutterManifest (pubspec):
flutter/packages/flutter_tools/lib/src/flutter_features_config.dart
Lines 130 to 146 in a873a27
However, the manifest is defined in the context_runner, which I think happens before the currentDirectory gets swapped. So therefore, does not use:
flutter/packages/flutter_tools/lib/src/context_runner.dart
Lines 221 to 233 in a873a27
[-]Flutter CLI ignores pubspec's SwiftPM enabled config if current dir is not app's root[/-][+]Flutter CLI ignores pubspec's Flutter features config (like SwiftPM) if current dir is not app's root[/+]flutter-triage-bot commentedon Oct 16, 2025
The
triaged-ioslabel is irrelevant if there is noteam-ioslabel orfyi-ioslabel.Look for project root for FeatureFlags manifest
Albert221 commentedon Jan 12, 2026
@bkonyi I've submitted a PR for this at #180689 FYI :)
Look for project root for FeatureFlags manifest (#180689)
github-actions commentedon Feb 10, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.Look for project root for FeatureFlags manifest (flutter#180689)