Repository navigation
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listhas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyiOS applications specificallyt: xcode"xcodebuild" on iOS and general Xcode project management"xcodebuild" on iOS and general Xcode project managementteam-iosOwned by iOS platform teamOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform teamTriaged by iOS platform team
Description
Steps to reproduce
- Have a Flutter plugin whose repository/folder name differs from its Dart package name — e.g., repo dir is NUXXXXX_DEVICE_PLUGIN_Lib, Dart package name is device_plugin.
- Set up SPM support per the guide (Package.swift with name: "device_plugin")).
- In the example app's pubspec.yaml, reference the plugin as a local path dependency:
- Enable SPM and run the example app:
flutter config --enable-swift-package-manager
flutter runActual results
Expected behavior
SPM resolves the plugin package successfully and the app builds.
Actual results
Adding Swift Package Manager integration...
An error occurred when adding Swift Package Manager integration:
Error: Unable to get Xcode project information:
xcodebuild: error: Could not resolve package dependencies:
unable to override package 'device_plugin' because its identity
'nuxxxxx_security_device_plugin_lib' doesn't match override's identity
(directory name) 'device_plugin'Logs
Logs
flutter run
Launching lib/main.dart on iPhone 16e in debug mode...
Adding Swift Package Manager integration... 1,614ms
An error occurred when adding Swift Package Manager integration:
Error: Unable to get Xcode project information:
2026-05-21 08:49:47.845 xcodebuild[12882:2710100] Writing error result bundle to
/var/folders/mp/h6npmgjs46sbd6q6c_v1q1q80000gr/T/ResultBundle_2026-21-05_08-49-0
047.xcresult
xcodebuild: error: Could not resolve package dependencies:
unable to override package 'device_plugin' because its identity
'nuxxxxx_security_device_plugin_lib' doesn't match override's identity
(directory name) 'device_plugin'
public headers ("include") directory path for 'device_plugin' is invalid or
not contained in the target
public headers ("include") directory path for 'device_plugin' is invalid or
not contained in the target
Swift Package Manager is currently an experimental feature, please file a bug at
https://github.com/flutter/flutter/issues/new?template=01_activation.yml
Consider including a copy of the following files in your bug report:
ios/Runner.xcodeproj/project.pbxproj
ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (or the scheme for
the flavor used)
To add Swift Package Manager integration manually, please use the following
instructions:
https://docs.flutter.dev/to/add-swift-package-manager-manually
You can also disable Swift Package Manager for the project by following these
instructions:
https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-app-dev
elopers#how-to-turn-off-swift-package-manager
Disabling Swift Package Manager will not be allowed in a future version of
Flutter.
Error launching application on iPhone 16e.
Flutter Doctor output
Doctor output
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.44.0, on macOS 26.1 25B78 darwin-arm64, locale en-CO)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 26.3)
[✓] Chrome - develop for the web
[✓] Connected device (5 available)
[✓] Network resources
• No issues found!
Reacted by Mikalai Daronin, Oleg Yakovlev and Robert Schulze Dieckhoff
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listhas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyiOS applications specificallyt: xcode"xcodebuild" on iOS and general Xcode project management"xcodebuild" on iOS and general Xcode project managementteam-iosOwned by iOS platform teamOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform teamTriaged by iOS platform team
Activity
mbcorona commentedon May 21, 2026
Hi @juan-campuzano , thanks for reporting, routing to team-ios for investigation.
Revert Package.swift additions pending Flutter #186881
vashworth commentedon Jun 4, 2026
@juan-campuzano Can you provide an example directory structure of this?
juan-campuzano commentedon Jun 4, 2026
@vashworth sure, here you go:
feat(ios): add Swift Package Manager support
feat(ios): add Swift Package Manager support
feat(ios): add Swift Package Manager support
feat(ios): add Swift Package Manager support
feat: iOS 插件支持 Swift Package Manager
feat: iOS 插件支持 Swift Package Manager(google 版)
Refactor SwiftPM symlink path logic (flutter#188647)
vashworth commentedon Aug 21, 2026
@juan-campuzano Can you verify your issue is fixed on the latest main branch?
juan-campuzano commentedon Aug 21, 2026
@vashworth sure, we'll give it a try and will let you know, thank you!
juan-campuzano commentedon Aug 24, 2026
@vashworth we verified it and it is currently working, will this be released in a patch version of 3.47?
github-actions commentedon Sep 7, 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.