Skip to content

Commit a38fc58

Browse files
committed
Use ifdef to control self.automaticallyLoadReactNativeWindow
1 parent b8b91c2 commit a38fc58

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,16 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
6060
[RCTComponentViewFactory currentComponentViewFactory].thirdPartyFabricComponentsProvider = self;
6161
}
6262

63+
#if !TARGET_OS_VISION
6364
if (self.automaticallyLoadReactNativeWindow) {
6465
[self loadReactNativeWindow:launchOptions];
6566
}
67+
#endif
6668

6769
return YES;
6870
}
6971

72+
#if !TARGET_OS_VISION
7073
- (void)loadReactNativeWindow:(NSDictionary *)launchOptions
7174
{
7275
UIView *rootView = [self.rootViewFactory viewWithModuleName:self.moduleName
@@ -79,6 +82,7 @@ - (void)loadReactNativeWindow:(NSDictionary *)launchOptions
7982
_window.rootViewController = rootViewController;
8083
[_window makeKeyAndVisible];
8184
}
85+
#endif
8286

8387
- (void)applicationDidEnterBackground:(UIApplication *)application
8488
{

0 commit comments

Comments
 (0)