Skip to content

Conversation

@flutteractionsbot
Copy link

@flutteractionsbot flutteractionsbot commented Jul 23, 2025

Issue Link:

#172282 (comment)

Changelog Description:

Do not call an API that was introduced in macOS 10.15 on versions before 10.15.

Impact Description:

Apps will crash on macOS 10.14 (which is a supported platform according to https://docs.flutter.dev/reference/supported-platforms)

Workaround:

Is there a workaround for this issue?

No

Risk:

What is the risk level of this cherry-pick?

  • Low
  • Medium
  • High

Test Coverage:

Are you confident that your fix is well-tested by automated tests?

  • Yes
  • No

(Tests that run on current versions of macOS will confirm that this PR does not cause regressions. But I don't know if we have any tests that run on macOS 10.14)

Validation Steps:

What are the steps to validate that this fix works?

Run a Flutter app on macOS Mojave (10.14)

<!--
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
-->

Overview
This PR fixes a crash that occurs when launching Flutter desktop
applications on macOS Mojave (10.14).

Changes Made
• Added conditional checks to ensure the code using the
`hasUnifiedMemory` API only runs on macOS 10.15 or later, since
`hasUnifiedMemory` is only supported starting from macOS 10.15.
• Ensured that the fix maintains compatibility with newer macOS versions
without affecting existing functionality.

Testing
• Verified that Flutter desktop apps launch and run normally on both
macOS Mojave and later macOS versions.
• Confirmed no side effects by running default Flutter desktop sample
apps.

Additional Notes
•
https://developer.apple.com/documentation/metal/mtldevice/hasunifiedmemory

This PR aims to improve the stability of Flutter desktop applications on
macOS Mojave.
Thank you for your review and consideration.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [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].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[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: Kim Ki Cheol <kim.kicheol@sk.com>
@flutteractionsbot
Copy link
Author

@jason-simmons please fill out the PR description above, afterwards the release team will review this request.

@flutteractionsbot flutteractionsbot added the cp: review Cherry-picks in the review queue label Jul 23, 2025
@flutter-dashboard
Copy link

This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter.

Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed.

@github-actions github-actions bot added engine flutter/engine related. See also e: labels. a: desktop Running on desktop platform-macos labels Jul 23, 2025
@reidbaker reidbaker added autosubmit Merge PR when tree becomes green via auto submit App and removed autosubmit Merge PR when tree becomes green via auto submit App labels Jul 23, 2025
@reidbaker
Copy link
Contributor

I have pinged @jtmcdole to approve since this cherry pick does not have a test.

@reidbaker reidbaker requested a review from jtmcdole July 23, 2025 14:15
Copy link
Member

@jtmcdole jtmcdole left a comment

Choose a reason for hiding this comment

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

"CI-tested versions" is 13+, so there's no real option to test this other than locally. Approved.

@reidbaker reidbaker added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 23, 2025
@auto-submit auto-submit bot merged commit 2350e38 into flutter:flutter-3.32-candidate.0 Jul 23, 2025
164 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop autosubmit Merge PR when tree becomes green via auto submit App cp: review Cherry-picks in the review queue engine flutter/engine related. See also e: labels. platform-macos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants