chore(ios): migrate example app to UIScene lifecycle - #214
Merged
Conversation
UIScene lifecycle is required on iOS 27 and later; flutter_tools hard-fails to launch an unmigrated app there. Ran Flutter's own UIScene migrator, which adds UIApplicationSceneManifest to Info.plist and moves plugin registration from didFinishLaunchingWithOptions to didInitializeImplicitFlutterEngine. Uses FlutterSceneDelegate directly rather than adding an empty SceneDelegate subclass, matching the migrator's output. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Test fixtures are generated and gitignored, so a fresh checkout shows a blank shelf with no explanation. Point at bin/fetch_test_resources instead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Member
Author
|
Just example app maintenance, merging |
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.
UIScene lifecycle is required on iOS 27+.
flutter_toolshard-fails to launch an unmigrated app there (ios/devices.dart:878), so this is a launch blocker, not just the CLI warning.Ran Flutter's own UIScene migrator rather than hand-editing: stripped
AppDelegate.swiftto the stock template, let the tool migrate, then re-addedimport flutter_readiumandonCustomEditingAction(). The plist key is therefore written by Flutter'splutil-backed parser.Info.plist— addsUIApplicationSceneManifest, pointing atFlutterSceneDelegate.AppDelegate.swift— conforms toFlutterImplicitEngineDelegate; plugin registration moves todidInitializeImplicitFlutterEngine.No
SceneDelegate.swift: the migrator usesFlutterSceneDelegatedirectly, which avoids aproject.pbxprojedit for no behaviour difference.Plugin sources needed no change — no
UIApplication.shared,keyWindow,.windows, or app-lifecycle delegate hooks anywhere influtter_readium/ios/.Second commit is unrelated but small: the example bookshelf now explains that an empty shelf means
bin/fetch_test_resourceshasn't been run, instead of rendering blank.Verification
On an iPhone 17 Pro simulator:
Finished migration to UIScene lifecycle.flutter build ios --config-only— no UIScene warnings.simctl io screenshot, since webviews don't appear in marionette captures).bin/formatandbin/analyzeclean.No CHANGELOG entry — both changes are example-app only.
🤖 Generated with Claude Code