Repository navigation
ios: attach to a scene that connected before didFinishLaunching - #713
Open
nivaldomcj wants to merge 1 commit into
Open
nivaldomcj wants to merge 1 commit into
nivaldomcj wants to merge 1 commit into
Conversation
Without UIApplicationSceneManifest in Info.plist, UIKit connects the scene before application:didFinishLaunchingWithOptions: runs, so the UISceneWillConnectNotification observer registered there never fires, no window is created and nothing is drawn. After registering the observers, attach to an already-connected scene if there is one. The README's Info.plist now declares the scene manifest, which apps built with the iOS 27 SDK need to launch at all. No scene delegate class is needed since miniquad creates the window itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Follow-up to #634.
#634 moved window creation into a
UISceneWillConnectNotificationobserver thatapplication:didFinishLaunchingWithOptions:registers. WhenInfo.plisthas noUIApplicationSceneManifest, UIKit connects the scene before that method runs, so the notification is already gone, no window is created, and the app shows a black screen. TheInfo.plistin the README has no manifest, so following the README hits this. #634 isn't in a release yet; 0.4.11 predates it.The window setup now lives in
attach_to_scene, which the observer calls, and whichdidFinishLaunchingalso calls whenconnectedScenesalready has a scene. The pending view is taken once, so whichever path runs first attaches it.The README's
Info.plistnow declares the scene manifest, since apps built with the iOS 27 SDK don't launch without one. #634 says the manifest needs aUISceneDelegateClassName. In my tests it works without one, while naming a class that doesn't conform toUISceneDelegatemakes UIKit throw at launch.examples/quadon the simulators, built with Xcode 27.2:Without the manifest, iOS 27.2 refuses to launch both builds with "UIScene life cycle is required for apps built with this SDK", which is what the README note is about.
cargo build --all-targetspasses for aarch64-apple-darwin and x86_64-apple-darwin, andcargo check --all-targetsfor the iOS and tvOS targets.Tested on macOS 27.2.1 (26B131), Apple M3 Max (arm64), Rust 1.98.0.