From 4a1d20f43c82296dd21bfd760fa63b65927e98fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Kn=C3=B6chel?= Date: Sat, 20 Jan 2024 09:25:44 +0100 Subject: [PATCH] Revert "feat(ios): support multi-scene applications (#13941)" This reverts commit bfc87a6517f0b70b82ea760b8d052381bddf1ff4. --- .../TitaniumKit/Sources/API/TiApp.h | 9 ++++++- .../TitaniumKit/Sources/API/TiApp.m | 27 ++++++++----------- iphone/iphone/Titanium.plist | 17 ------------ support/iphone/Info.plist | 17 ------------ 4 files changed, 19 insertions(+), 51 deletions(-) diff --git a/iphone/TitaniumKit/TitaniumKit/Sources/API/TiApp.h b/iphone/TitaniumKit/TitaniumKit/Sources/API/TiApp.h index a9fe584766f..85053a484da 100644 --- a/iphone/TitaniumKit/TitaniumKit/Sources/API/TiApp.h +++ b/iphone/TitaniumKit/TitaniumKit/Sources/API/TiApp.h @@ -13,10 +13,17 @@ #import "TiRootViewController.h" #import +extern BOOL applicationInMemoryPanic; // TODO: Remove in SDK 9.0+ + +// TODO: Remove in SDK 9.0+ +TI_INLINE void waitForMemoryPanicCleared() //WARNING: This must never be run on main thread, or else there is a risk of deadlock! +{ +} + /** TiApp represents an instance of an application. There is always only one instance per application which could be accessed through class method. */ -@interface TiApp : TiHost { +@interface TiApp : TiHost { UIWindow *window; UIImageView *loadView; UIView *splashScreenView; diff --git a/iphone/TitaniumKit/TitaniumKit/Sources/API/TiApp.m b/iphone/TitaniumKit/TitaniumKit/Sources/API/TiApp.m index 310aefd339d..fd53a04cc7f 100644 --- a/iphone/TitaniumKit/TitaniumKit/Sources/API/TiApp.m +++ b/iphone/TitaniumKit/TitaniumKit/Sources/API/TiApp.m @@ -33,6 +33,11 @@ #define SHUTDOWN_TIMEOUT_IN_SEC 3 +BOOL applicationInMemoryPanic = NO; // TODO: Remove in SDK 9.0+ + +// TODO: Remove in SDK 9.0+ +TI_INLINE void waitForMemoryPanicCleared(void); //WARNING: This must never be run on main thread, or else there is a risk of deadlock! + @interface TiApp () - (void)checkBackgroundServices; - (void)appBoot; @@ -322,9 +327,15 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( [[TiLogServer defaultLogServer] start]; } + // Initialize the root-window + window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; + // Initialize the launch options to be used by the client launchOptions = [[NSMutableDictionary alloc] initWithDictionary:launchOptions_]; + // Initialize the root-controller + [self initController]; + // If we have a APNS-UUID, assign it NSString *apnsUUID = [[NSUserDefaults standardUserDefaults] stringForKey:@"APNSRemoteDeviceUUID"]; if (apnsUUID != nil) { @@ -1224,22 +1235,6 @@ - (KrollBridge *)krollBridge return kjsBridge; } -#pragma mark UIWindowSceneDelegate - -- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options -{ - return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role]; -} - -- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions -{ - // Initialize the root-window - window = [[UIWindow alloc] initWithWindowScene:(UIWindowScene *)scene]; - - // Initialize the root-controller - [self initController]; -} - #pragma mark Background Tasks - (void)beginBackgrounding diff --git a/iphone/iphone/Titanium.plist b/iphone/iphone/Titanium.plist index 448f4c87fe8..997d287518d 100644 --- a/iphone/iphone/Titanium.plist +++ b/iphone/iphone/Titanium.plist @@ -78,22 +78,5 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - UIApplicationSceneManifest - - UIApplicationSupportsMultipleScenes - - UISceneConfigurations - - UIWindowSceneSessionRoleApplication - - - UISceneConfigurationName - Default Configuration - UISceneDelegateClassName - TiApp - - - - diff --git a/support/iphone/Info.plist b/support/iphone/Info.plist index 72b06667636..f9500da5954 100644 --- a/support/iphone/Info.plist +++ b/support/iphone/Info.plist @@ -36,22 +36,5 @@ 1.0 LSRequiresIPhoneOS - UIApplicationSceneManifest - - UIApplicationSupportsMultipleScenes - - UISceneConfigurations - - UIWindowSceneSessionRoleApplication - - - UISceneConfigurationName - Default Configuration - UISceneDelegateClassName - TiApp - - - -