mirror of
				https://gitcode.com/gh_mirrors/re/react-native-pushy.git
				synced 2025-10-31 13:23:12 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			29 lines
		
	
	
		
			846 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			846 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| #import "AppDelegate.h"
 | |
| #import "RCTPushy.h"
 | |
| 
 | |
| #import <React/RCTBundleURLProvider.h>
 | |
| 
 | |
| @implementation AppDelegate
 | |
| 
 | |
| - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
 | |
| {
 | |
|   self.moduleName = @"AwesomeProject";
 | |
|   // 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
 | 
