Skip to content

Tool: Provide guided migration logs when iOS app crashes due to missi…#188556

Merged
auto-submit[bot] merged 5 commits into
flutter:masterfrom
okorohelijah:fix-uiscene-crash-log-interception
Jun 26, 2026
Merged

Tool: Provide guided migration logs when iOS app crashes due to missi…#188556
auto-submit[bot] merged 5 commits into
flutter:masterfrom
okorohelijah:fix-uiscene-crash-log-interception

Conversation

@okorohelijah

@okorohelijah okorohelijah commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

When an unmigrated iOS app runs on iOS 27+, it immediately crashes on launch because the UIScene lifecycle is required.

List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.

Fixes #187758

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

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.

…ng UIScene lifecycle

- Populate UserMessages.uiSceneMigrationWarning with a helpful migration guide.

- Update devicectl _ignorePatterns in core_devices.dart to preserve UIScene crash logs.

- Add uiscene_crash LogInterceptor to IOSDevice to catch the crash and throw a guided ToolExit.

- Add unit tests verifying the log interception and exit behavior.

Fixes flutter#187758
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 25, 2026
@github-actions github-actions Bot added platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. team-ios Owned by iOS platform team labels Jun 25, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 25, 2026
@okorohelijah okorohelijah added the CICD Run CI/CD label Jun 25, 2026
@okorohelijah
okorohelijah marked this pull request as ready for review June 25, 2026 16:11
@okorohelijah
okorohelijah requested a review from a team as a code owner June 25, 2026 16:11
@okorohelijah
okorohelijah requested a review from vashworth June 25, 2026 16:12

@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 updates the iOS device logging and error handling to detect and handle UIScene lifecycle requirements. Specifically, it changes 'uiSceneMigrationWarning' to a non-nullable getter, adds a log interceptor to throw a 'ToolExit' when a UIScene crash log is detected, and updates the relevant tests. Feedback on these changes highlights a typo in the warning message referring to 'iOS 27' instead of 'iOS 18', and notes that the documentation comment for the public 'uiSceneMigrationWarning' getter was mistakenly removed.

Comment thread packages/flutter_tools/lib/src/base/user_messages.dart Outdated
Comment thread packages/flutter_tools/lib/src/base/user_messages.dart Outdated
@okorohelijah

Copy link
Copy Markdown
Contributor Author

Proposed future improvement in #188557

@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 25, 2026
@okorohelijah okorohelijah added the CICD Run CI/CD label Jun 25, 2026
Comment thread packages/flutter_tools/lib/src/ios/core_devices.dart
Comment thread packages/flutter_tools/lib/src/base/user_messages.dart Outdated
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 26, 2026
@okorohelijah okorohelijah added the CICD Run CI/CD label Jun 26, 2026
@okorohelijah
okorohelijah requested a review from vashworth June 26, 2026 06:23
Comment thread packages/flutter_tools/lib/src/base/user_messages.dart Outdated
@okorohelijah
okorohelijah requested a review from vashworth June 26, 2026 20:35
@okorohelijah okorohelijah added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 26, 2026
@auto-submit
auto-submit Bot added this pull request to the merge queue Jun 26, 2026
Merged via the queue into flutter:master with commit ac6f8e6 Jun 26, 2026
162 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 26, 2026
pull Bot pushed a commit to edisplay/flutter that referenced this pull request Jun 30, 2026
…ter#188736)

When an unmigrated iOS app runs on iOS 27+, it immediately crashes on
launch because the `UIScene` lifecycle is required.

Part II of flutter#188556

*List which issues are fixed by this PR. You must list at least one
issue. An issue is not required if the PR fixes something trivial like a
typo.*

Fixes flutter#187758

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## 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 `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD platform-ios iOS applications specifically team-ios Owned by iOS 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.

Provide guided logs when app crashes due to UIScene on iOS 27

2 participants