Skip to content

Commit

Permalink
Merge branch 'master' into regen-builds-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cb1kenobi authored Jan 20, 2024
2 parents 4f42b88 + 4a1d20f commit 2aa5637
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 51 deletions.
9 changes: 8 additions & 1 deletion iphone/TitaniumKit/TitaniumKit/Sources/API/TiApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,17 @@
#import "TiRootViewController.h"
#import <JavaScriptCore/JavaScriptCore.h>

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 <app> class method.
*/
@interface TiApp : TiHost <UIApplicationDelegate, NSURLSessionDelegate, NSURLSessionTaskDelegate, NSURLSessionDownloadDelegate, UNUserNotificationCenterDelegate, UIWindowSceneDelegate> {
@interface TiApp : TiHost <UIApplicationDelegate, NSURLSessionDelegate, NSURLSessionTaskDelegate, NSURLSessionDownloadDelegate, UNUserNotificationCenterDelegate> {
UIWindow *window;
UIImageView *loadView;
UIView *splashScreenView;
Expand Down
27 changes: 11 additions & 16 deletions iphone/TitaniumKit/TitaniumKit/Sources/API/TiApp.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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
Expand Down
17 changes: 0 additions & 17 deletions iphone/iphone/Titanium.plist
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,5 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<true/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>TiApp</string>
</dict>
</array>
</dict>
</dict>
</dict>
</plist>
17 changes: 0 additions & 17 deletions support/iphone/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,5 @@
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>TiApp</string>
</dict>
</array>
</dict>
</dict>
</dict>
</plist>

0 comments on commit 2aa5637

Please sign in to comment.