Skip to content

[iOS/MacOS] Warn when using deprecated framework build commands - #191644

Merged
auto-submit[bot] merged 12 commits into
flutter:masterfrom
Wreos:fix/issue-191367-framework-migration-warning
Oct 23, 2026
Merged

auto-submit[bot] merged 12 commits into
flutter:masterfrom
Wreos:fix/issue-191367-framework-migration-warning

Conversation

@Wreos

@Wreos Wreos commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Adds migration warnings to the deprecated flutter build ios-framework and flutter build macos-framework commands. It warns users of the replacement flutter build swift-package command and points to migration documentation.
Added test + tested locally

Screenshots
image
image

Fixes #191367.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@Wreos
Wreos requested review from a team as code owners August 25, 2026 05:01
@github-actions github-actions Bot added tool Affects the "flutter" command-line tool. See also t: labels. team-ios Owned by iOS platform team team-macos Owned by the macOS platform team labels Aug 25, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request deprecates the "flutter build ios-framework" and "flutter build macos-framework" commands, replacing them with "flutter build swift-package". It introduces a helper method to print migration warnings and adds corresponding tests. Feedback suggests reordering the new method within the class and adding public-quality documentation (///) to align with the Flutter Style Guide.

@LouiseHsu
LouiseHsu requested a review from vashworth August 27, 2026 21:50
@LongCatIsLooong LongCatIsLooong added the waiting for response The Flutter team cannot make further progress on this issue until the original reporter responds label Sep 3, 2026
Co-authored-by: Victoria Ashworth <[email protected]>
@github-actions github-actions Bot removed the waiting for response The Flutter team cannot make further progress on this issue until the original reporter responds label Sep 4, 2026
… properties

Instead of using a custom printMigrationWarning() method, now uses the standard
deprecated and deprecationWarning properties from the FlutterCommand base class.
This provides a more consistent approach across all deprecated commands and
automatically marks the commands as hidden.

Changes:
- Override deprecated getter to return true in BuildIOSFrameworkCommand and BuildMacOSFrameworkCommand
- Override deprecationWarning getter to provide platform-specific migration messages
- Remove custom printMigrationWarning() method from BuildFrameworkCommand base class
- Remove manual calls to printMigrationWarning() from each command's runCommand()
- Update tests to use global logger (set by testUsingContext) for deprecation warning checks
- Fix macOS test to use correct platform URL

Addresses feedback from vashworth on PR flutter#191644
vashworth
vashworth previously approved these changes Sep 24, 2026
@vashworth vashworth added the CICD Run CI/CD label Sep 24, 2026
@flutter-dashboard flutter-dashboard Bot removed the CICD Run CI/CD label Sep 24, 2026
@vashworth vashworth added the CICD Run CI/CD label Sep 24, 2026
@hellohuanlin
hellohuanlin self-requested a review September 24, 2026 21:38
@flutter-dashboard flutter-dashboard Bot removed the CICD Run CI/CD label Sep 29, 2026
@vashworth vashworth added the CICD Run CI/CD label Sep 29, 2026
@vashworth
vashworth requested review from okorohelijah and removed request for hellohuanlin October 1, 2026 18:25
@flutter-dashboard flutter-dashboard Bot removed the CICD Run CI/CD label Oct 1, 2026
@okorohelijah okorohelijah added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 14, 2026
@auto-submit

auto-submit Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/191644, because The base commit of the PR is older than 7 days and can not be merged. Please merge the latest changes from the main into this branch and resubmit the PR.

@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 14, 2026
@flutter-dashboard flutter-dashboard Bot removed the CICD Run CI/CD label Oct 17, 2026
@vashworth vashworth added CICD Run CI/CD autosubmit Merge PR when tree becomes green via auto submit App labels Oct 23, 2026
@auto-submit
auto-submit Bot added this pull request to the merge queue Oct 23, 2026
Merged via the queue into flutter:master with commit a29b620 Oct 23, 2026
26 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 23, 2026
@Wreos
Wreos deleted the fix/issue-191367-framework-migration-warning branch October 24, 2026 09:15
suryaKommana2662 pushed a commit to suryaKommana2662/flutter that referenced this pull request Oct 29, 2026
…ter#191644)

<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

Adds migration warnings to the deprecated flutter build ios-framework
and flutter build macos-framework commands. It warns users of the
replacement flutter build swift-package command and points to [migration
documentation](https://docs.flutter.dev/add-to-app/ios/project-setup).
Added test + tested locally

Screenshots
<img width="932" height="186" alt="image"
src="https://github.com/user-attachments/assets/40c8d50b-b698-4cfa-896a-722a472db74d"
/>
<img width="1187" height="261" alt="image"
src="https://github.com/user-attachments/assets/66c5e23f-5645-47cf-94ea-906589f31d37"
/>

Fixes flutter#191367.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

If this change needs to override an active code freeze, provide a
comment explaining why. The code freeze workflow can be overridden by
code reviewers. See pinned issues for any active code freezes with
guidance.

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Victoria Ashworth <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD team-ios Owned by iOS platform team team-macos Owned by the macOS platform team tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Print warning to migrate to new iOS add to app command

5 participants