Browse Source

Fix explorer not showing up when not specifying a scene

Iulian Onofrei 6 years ago
parent
commit
b9c9af5509
1 changed files with 4 additions and 2 deletions
  1. 4 2
      Classes/Manager/FLEXManager.m

+ 4 - 2
Classes/Manager/FLEXManager.m

@@ -80,8 +80,10 @@
     self.explorerWindow.hidden = NO;
 #if FLEX_AT_LEAST_IOS13_SDK
     if (@available(iOS 13.0, *)) {
-        // Only look for a new scene if the one we have isn't the active scene
-        if (self.explorerWindow.windowScene.activationState != UISceneActivationStateForegroundActive) {
+        // Only look for a new scene if we don't have one, or the one we have
+        // isn't the active scene
+        if (!self.explorerWindow.windowScene ||
+            self.explorerWindow.windowScene.activationState != UISceneActivationStateForegroundActive) {
             for (UIScene *scene in UIApplication.sharedApplication.connectedScenes) {
                 // Look for an active UIWindowScene
                 if (scene.activationState == UISceneActivationStateForegroundActive &&