React Native using pre-bundled file on device, even if DEV-mode

前端 未结 7 927
南笙
南笙 2020-12-30 20:05

A few days ago, when I build and run my react native app from Xcode on a device, I realised that even if I set my scheme to Debug, the app is still loading from a pre-bundle

相关标签:
7条回答
  • 2020-12-30 20:43

    In react native 0.40.0, React native try to guess bundle location by itself. Please see if following points can help:

    • Make sure your AppDelegate.m have this line:jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];

    • Check your device and your Xcode mac is running on same wifi. Internally for IOS, react native try to guess ip by itself.

    • Try running app first through command line, so dev packager server is running and then run app through xcode in your device.

    0 讨论(0)
提交回复
热议问题