React Native 0.30にアップグレードして以来、開発用サーバーではなく、バンドル済みのファイルから物理的なiPhoneをビルドしています。変更を確認する唯一の方法は、アプリを再構築して実行することです。以前は、iPhoneをリフレッシュして瞬時に変更を確認することができました。React Native 0.30がiPhoneデバイスの開発サーバーから変更されないのはなぜですか?
私がシミュレータを使用している場合、変更は開発サーバーからうまくロードされます。ここで
は私AppDelegate.mである:0.30で
#import "AppDelegate.h"
#import "RCTBundleURLProvider.h"
#import "RCTRootView.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSURL *jsCodeLocation;
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"upool"
initialProperties:nil
launchOptions:launchOptions];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
return YES;
}
@end