|
@@ -352,6 +352,7 @@ API_AVAILABLE(ios(13.0))
|
|
|
@implementation SDLUIKitSceneDelegate
|
|
@implementation SDLUIKitSceneDelegate
|
|
|
{
|
|
{
|
|
|
UIWindow *launchWindow;
|
|
UIWindow *launchWindow;
|
|
|
|
|
+ NSMutableArray<NSURL *> *launchURLs;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ (NSString *)getSceneDelegateClassName
|
|
+ (NSString *)getSceneDelegateClassName
|
|
@@ -411,15 +412,16 @@ API_AVAILABLE(ios(13.0))
|
|
|
// Set working directory to resource path
|
|
// Set working directory to resource path
|
|
|
[[NSFileManager defaultManager] changeCurrentDirectoryPath:[bundle resourcePath]];
|
|
[[NSFileManager defaultManager] changeCurrentDirectoryPath:[bundle resourcePath]];
|
|
|
|
|
|
|
|
- // Handle any connection options (like opening URLs)
|
|
|
|
|
|
|
+ launchURLs = [[NSMutableArray alloc] init];
|
|
|
|
|
+
|
|
|
for (NSUserActivity *activity in connectionOptions.userActivities) {
|
|
for (NSUserActivity *activity in connectionOptions.userActivities) {
|
|
|
if (activity.webpageURL) {
|
|
if (activity.webpageURL) {
|
|
|
- [self handleURL:activity.webpageURL];
|
|
|
|
|
|
|
+ [launchURLs addObject:activity.webpageURL];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
for (UIOpenURLContext *urlContext in connectionOptions.URLContexts) {
|
|
for (UIOpenURLContext *urlContext in connectionOptions.URLContexts) {
|
|
|
- [self handleURL:urlContext.URL];
|
|
|
|
|
|
|
+ [launchURLs addObject:urlContext.URL];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
SDL_SetMainReady();
|
|
SDL_SetMainReady();
|
|
@@ -488,6 +490,7 @@ API_AVAILABLE(ios(13.0))
|
|
|
- (void)postFinishLaunch
|
|
- (void)postFinishLaunch
|
|
|
{
|
|
{
|
|
|
[self performSelector:@selector(hideLaunchScreen) withObject:nil afterDelay:0.0];
|
|
[self performSelector:@selector(hideLaunchScreen) withObject:nil afterDelay:0.0];
|
|
|
|
|
+ [self performSelector:@selector(processLaunchURLs) withObject:nil afterDelay:0.0];
|
|
|
|
|
|
|
|
SDL_SetiOSEventPump(true);
|
|
SDL_SetiOSEventPump(true);
|
|
|
exit_status = SDL_CallMainFunction(forward_argc, forward_argv, forward_main);
|
|
exit_status = SDL_CallMainFunction(forward_argc, forward_argv, forward_main);
|
|
@@ -499,6 +502,14 @@ API_AVAILABLE(ios(13.0))
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+- (void)processLaunchURLs
|
|
|
|
|
+{
|
|
|
|
|
+ for (NSURL *url in launchURLs) {
|
|
|
|
|
+ [self handleURL:url];
|
|
|
|
|
+ }
|
|
|
|
|
+ launchURLs = nil;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options API_AVAILABLE(ios(13.0))
|
|
- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options API_AVAILABLE(ios(13.0))
|
|
|
{
|
|
{
|
|
|
// This doesn't appear to be called, but it needs to be implemented to signal that we support the UIScene life cycle
|
|
// This doesn't appear to be called, but it needs to be implemented to signal that we support the UIScene life cycle
|