#import "AppDelegate.h" #import #import @implementation AppDelegate - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary *)options { return [RCTLinkingManager application:application openURL:url options:options]; } - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { #if DEBUG #else NSDictionary *oldSettins = [[NSUserDefaults standardUserDefaults] valueForKey:@"RCTDevMenu"]; if ([oldSettins.allKeys containsObject:@"isDebuggingRemotely"]) { NSMutableDictionary *settings = oldSettins?[oldSettins mutableCopy]:[NSMutableDictionary dictionary]; [settings removeObjectForKey:@"isDebuggingRemotely"]; [[NSUserDefaults standardUserDefaults] setObject:settings forKey:@"RCTDevMenu"]; } [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"RCT_jsLocation"]; #endif self.moduleName = @"taroDemo"; // 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 { return [self getBundleURL]; } - (NSURL *)getBundleURL { #if DEBUG return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; #else return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; #endif } @end