You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flutter CLI ignores pubspec's Flutter features config (like SwiftPM) if current dir is not app's root #176294
flutter create test_app --platforms ios and cd test_app
flutter config --enable-swift-package-manager (because majority of my apps use it, or whatever reason)
Add config: enable-swift-package-manager: false to pubspec (with proper indentations of course)
flutter pub add firebase_core
Run flutter pub get. cd ios/
Update the first line of Podfile so that the minimum deployment target is "15.0", and uncomment the line (required by Firebase, unrelated to the bug).
pod install. Check Podfile.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), run flutter pub get. The config is ignored. Regenerate Podfile from symlinks with pod 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.
changed the title [-]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.[/+]on Oct 1, 2025
changed the title [-]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[/+]on Oct 1, 2025
changed the title [-]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[/+]on Oct 16, 2025
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 -v and a minimal reproduction of the issue.
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)