#import "AppDelegate.h" #import "RCTPushy.h" #import #import @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.moduleName = @"AwesomeProject"; self.dependencyProvider = [RCTAppDependencyProvider new]; // 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 *)bundleURL { #if DEBUG // 原先DEBUG这里的写法不作修改(所以DEBUG模式下不可热更新) return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; #else return [RCTPushy bundleURL]; // <-- 把这里非DEBUG的情况替换为热更新bundle #endif } @end