Repository navigation
Fix iOS apps crashing at launch on iOS 27 when built with Xcode 27 - #7044
Merged
Merged
Conversation
Deploying flet-website-v2 with
|
| Latest commit: |
8a0dce7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9ed89ed8.flet-website-v2.pages.dev |
| Branch Preview URL: | https://fix-ios27-uiscene-launch-cra.flet-website-v2.pages.dev |
FeodorFitsner
approved these changes
Nov 4, 2026
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Apps made with
flet build ipaand Xcode 27 crash at launch on iOS 27, before Python starts. The crash is in UIKit, while the app's first scene is being created:UIKit logs the reason:
The build itself succeeds, so the failure only shows when the app runs on iOS 27. The iOS 26.5 simulator doesn't show it, and CI builds with Xcode 26.6. The build template doesn't adopt the UIScene lifecycle, while
client/iosalready does.Fix
The template now matches
client/ios/Runner:Info.plist: addsUIApplicationSceneManifestwithFlutterSceneDelegate.AppDelegate.swift: adoptsFlutterImplicitEngineDelegateand registers plugins indidInitializeImplicitFlutterEngine, throughengineBridge.pluginRegistry. Theflutter_local_notificationsregistrant callback moves there too.UNUserNotificationCenter.current().delegatestays indidFinishLaunchingWithOptions.Custom build templates need the same two changes, which the changelog notes.
Testing
Built with
flet build ipaon Xcode 27.2 and Flutter 3.47.9, with no manual patching of the generated project. The app includedflet-audioandflet-notifications, so theflutter_local_notificationsbranch ofAppDelegate.swiftwas compiled and used.Before and after, same app:
"Without the fix" on the simulators is the generated project with the template's previous
AppDelegate.swiftrestored and the scene manifest removed. The iPhone crash came from an earlier app built the same way with the previous template.With the fix, in more detail:
on_tappage.routeis/cold?id=1on_route_changefiresOlder SDKs: a copy of the unfixed app with its recorded SDK version changed to 26.5 with
vtoollaunched and played audio on the iOS 27.2 simulator, with no scene error logged. That fits UIKit's message: the requirement seems to apply to apps built with the iOS 27 SDK, so apps already built with an older Xcode should keep launching. It wasn't a real build from an older Xcode.Not tested
flet debugandflet teston a device, which use the same template.Summary by Sourcery
Adopt the UIScene lifecycle in generated iOS apps and align CI coverage with Xcode 27 and iOS 27.
Bug Fixes:
CI:
Documentation: