Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add link to SwiftPM manual integration instructions #168066

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,6 @@ class SwiftPackageManagerIntegrationMigration extends ProjectMigrator {
await _xcodeProjectInterpreter.getInfo(_xcodeProject.hostAppRoot.path);
} on Exception catch (e) {
restoreFromBackup(schemeInfo);
// TODO(vashworth): Add link to instructions on how to manually integrate
// once available on website.
throwToolExit(
'An error occurred when adding Swift Package Manager integration:\n'
' $e\n\n'
Expand All @@ -184,10 +182,12 @@ class SwiftPackageManagerIntegrationMigration extends ProjectMigrator {
' ${_platform.name}/Runner.xcodeproj/project.pbxproj\n'
' ${_platform.name}/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme '
'(or the scheme for the flavor used)\n\n'
'To avoid this failure, disable Flutter Swift Package Manager integration for the project\n'
'To add Swift Package Manager integration manually, please use the following instructions:\n'
'https://docs.flutter.dev/to/add-swift-package-manager-manually\n\n'
'Alternatively, to avoid this failure, disable Flutter Swift Package Manager integration for the project\n'
Copy link
Member

@loic-sharma loic-sharma Apr 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we ask the user to send us a bug report by linking to https://github.com/flutter/flutter/issues/new/choose?

This might be noisy, but it'd be good for us to be aware of the reasons why the migration fails. I don't feel strongly about this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do, if you look at the complete error message, it's at the beginning.

'by adding the following in the project\'s pubspec.yaml under the "flutter" section:\n'
' "disable-swift-package-manager: true"\n'
'Alternatively, disable Flutter Swift Package Manager integration globally with the\n'
'Or disable Flutter Swift Package Manager integration globally with the\n'
'following command:\n'
' "flutter config --no-enable-swift-package-manager"\n',
);
Expand Down