diff --git a/autolink/postlink/appDelegateLinker.js b/autolink/postlink/appDelegateLinker.js index cff0dab978c..d5f265c8640 100644 --- a/autolink/postlink/appDelegateLinker.js +++ b/autolink/postlink/appDelegateLinker.js @@ -104,7 +104,7 @@ class AppDelegateLinker { return content.replace( /RCTBridge.*];/, 'RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];\n' + - '[ReactNativeNavigation bootstrapWithBridge:bridge];' + '[ReactNativeNavigation bootstrapWithBridge:bridge];' ); } @@ -146,6 +146,7 @@ class AppDelegateLinker { const toRemove = [ /RCTRootView\s+\*rootView((.|\r|\s)*?)];\s+/, + /UIView \*rootView = RCTAppSetupDefaultRootView\(bridge, @".*", nil\);/, /if \(@available\(iOS 13\.0, \*\)\)\s{\s+ rootView.backgroundColor((.|\r)*)];\s+}\s+else {[^}]*}/, /self.window((.|\r)*)];\s+/, /UIViewController\s\*rootViewController((.|\r)*)];\s+/, @@ -169,7 +170,7 @@ class AppDelegateLinker { ' No elements could be removed. Check the manual installation docs to verify that everything is properly setup:\n https://wix.github.io/react-native-navigation/docs/installing#native-installation' ); } else { - throw new Error( + warnn( 'Some elements were removed. Check the manual installation docs to verify that everything is properly setup:\n https://wix.github.io/react-native-navigation/docs/installing#native-installation' ); }