2016-07-20 11 views
1

に取り組んでいない私が振ったときに、アプリは罰金ロードするように思えるが、リモートJSデバッグを有効に私はこのエラーを取得する:リアクト - ネイティブリモートデバッガが、私は私のiPhone上で反応し、ネイティブアプリを実行しているiPhone

enter image description here

React-Nativeの文書https://facebook.github.io/react-native/docs/running-on-device-ios.htmlに従ってみましたが、古くなったようです。

AppDelegate.m任意の助けをいただければ幸いです

#import "AppDelegate.h" 
#import "RCTBundleURLProvider.h" 
#import "RCTRootView.h" 

@implementation AppDelegate 

- (BOOL)application:(UIApplication *)application  didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{ 
    NSURL *jsCodeLocation; 

    [[RCTBundleURLProvider sharedSettings] setDefaults]; 
    jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil]; 


    RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 
                 moduleName:@"abcrn123" 
              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 

、私が実行しようとしていると、実際のデバイス上で反応し、ネイティブアプリをデバッグしています。

ありがとう、ダグ。

答えて

1

時々タイムアウトします。私は通常、この手順でそれを使用します。 1.シェイクしてから、リモートデバッグを停止します。 2.走らせてください。 3.再度シェイクして、リモートデバッグを元に戻します。 4.再度リロードする必要があります。そして、あなたは行かなくてはなりません。

私は迷惑だと知っています...

1

私はこれで少し戦ったのです。 -

  • $ react-native run-ios --device "iPad" (または何https://gist.github.com/jarretmoses/c2e4786fd342b3444f3bc6beff32098d
  • $ REACT_DEBUGGER="open -g 'rndebugger://set-debugger-loc?port=8001' ||" react-native start
    (ターミナルウィンドウを切り替えるになりましパッケージャランニング):に従って、watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean -force && npm install

    1. クリアすべてのキャッシュを経由して、新鮮な起動する:ここでReact Native Debuggerを使用して流れですあなたのデバイスに名前が付けられています)
    2. iPad上に記載されているIPアドレスをメモするか、緑のステータスバーで読み込み時に何かを書き留めてください。
    3. は、お使いのデバイスのがらくたを振ると、ポップアップの「リモートJSのデバッグを有効にする」を選択
    4. $ open "rndebugger://set-debugger-loc?host=192.168.1.231&port=8081"
      IPアドレス==アドレス(iPadの無線LAN設定で対処していない)緑色のステータスバーに記載されている...
  • 関連する問題