From 6ff7c459e3d08ebdf6da6973ebe0410b5cab9c0a Mon Sep 17 00:00:00 2001 From: Alberto-Duarte Date: Thu, 11 May 2023 11:40:35 +0100 Subject: first commit --- ios/reactnativeapp/AppDelegate.mm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 ios/reactnativeapp/AppDelegate.mm (limited to 'ios/reactnativeapp/AppDelegate.mm') diff --git a/ios/reactnativeapp/AppDelegate.mm b/ios/reactnativeapp/AppDelegate.mm new file mode 100644 index 0000000..3ef3d80 --- /dev/null +++ b/ios/reactnativeapp/AppDelegate.mm @@ -0,0 +1,36 @@ +#import "AppDelegate.h" + +#import + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + self.moduleName = @"reactnativeapp"; + // You can add your custom initial props in the dictionary below. + // They will be passed down to the ViewController used by React Native. + self.initialProps = @{}; + + return [super application:application didFinishLaunchingWithOptions:launchOptions]; +} + +- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge +{ +#if DEBUG + return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; +#else + return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; +#endif +} + +/// This method controls whether the `concurrentRoot`feature of React18 is turned on or off. +/// +/// @see: https://reactjs.org/blog/2022/03/29/react-v18.html +/// @note: This requires to be rendering on Fabric (i.e. on the New Architecture). +/// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`. +- (BOOL)concurrentRootEnabled +{ + return true; +} + +@end -- cgit v1.2.3-54-g00ecf