-
Notifications
You must be signed in to change notification settings - Fork 435
Enforce Apple's iOS 27 launch-screen and scene-lifecycle rules #5855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1a2d6a6
5718acb
7dcc84c
631d19d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,9 +24,7 @@ | |
| #if !TARGET_OS_WATCH | ||
|
|
||
| #import "CodenameOne_GLAppDelegate.h" | ||
| #ifdef CN1_USE_UI_SCENE | ||
| #import "CodenameOne_GLSceneDelegate.h" | ||
| #endif | ||
| #import "CN1JailbreakDetector.h" | ||
| #include "xmlvm.h" | ||
| #import <objc/message.h> | ||
|
|
@@ -586,9 +584,9 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( | |
| cn1_debugger_start(); | ||
| #endif | ||
| [self cn1EnsureViewController]; | ||
| #ifndef CN1_USE_UI_SCENE | ||
| [self cn1InstallRootViewControllerIntoWindow:self.window]; | ||
| #endif | ||
| // The root view controller is installed by CodenameOne_GLSceneDelegate, not here: under | ||
| // the scene lifecycle self.window is nil at this point, because UIKit has not connected | ||
| // a scene yet. | ||
| NSURL *url = (NSURL *)[launchOptions valueForKey:UIApplicationLaunchOptionsURLKey]; | ||
| [self cn1StoreAppArgForURL:url]; | ||
| if (@available(iOS 8, *)) { | ||
|
|
@@ -767,20 +765,18 @@ - (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions: | |
| return YES; | ||
| } | ||
|
|
||
| #ifdef CN1_USE_UI_SCENE | ||
| - (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options API_AVAILABLE(ios(13.0)) | ||
| { | ||
| UISceneConfiguration *sceneConfiguration = [UISceneConfiguration configurationWithName:@"Default Configuration" sessionRole:connectingSceneSession.role]; | ||
| sceneConfiguration.delegateClass = [CodenameOne_GLSceneDelegate class]; | ||
| return sceneConfiguration; | ||
|
Comment on lines
768
to
772
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When an app references Useful? React with 👍 / 👎. |
||
| } | ||
| #endif | ||
|
|
||
| // Compiled for universal links OR intents OR continuity: without the second and third conditions | ||
| // a Spotlight tap, or a handoff from the user's other device, on a legacy-lifecycle build | ||
| // (ios.uiscene=false) would silently do nothing, since the scene delegate is what routes this on | ||
| // a default build. Continuity was added here for exactly the reason intents was: the branch it | ||
| // needs inside cn1ContinueUserActivity: is compiled, and on a legacy build nothing ever calls it. | ||
| // Compiled for universal links OR intents OR continuity. The scene delegate is what routes this | ||
| // on a live app, so this app-level callback is the path UIKit takes when it hands the activity | ||
| // to the application rather than to a scene -- a Spotlight tap or a handoff from the user's | ||
| // other device. Intents and continuity are in the condition because the branch each needs inside | ||
| // cn1ContinueUserActivity: has to be compiled for that call to do anything. | ||
| #if defined(CN1_HANDLE_UNIVERSAL_LINKS) || defined(CN1_USE_INTENTS) \ | ||
| || defined(CN1_USE_CONTINUITY) | ||
| // https://developer.apple.com/documentation/uikit/core_app/allowing_apps_and_websites_to_link_to_your_content?language=objc | ||
|
|
||
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
ByteCodeTranslatoris invoked directly iniosmode,handleAppleOutput()copiestemplate-Info.plistinto the generated Xcode project without the laterIPhoneBuilder.injectToPlist()pass. That template now contains neitherUIApplicationSceneManifestnor launch metadata, while this code no longer installs the root controller through the legacy lifecycle and theMainWindowNIB was deleted. Consequently, standalone translated projects never connectCodenameOne_GLSceneDelegate, launch without a window, and are also invalid when linked with the iOS 27 SDK; generate the required metadata in the translator path or retain a working fallback.Useful? React with 👍 / 👎.