First, we need to test that the static bundle can be loaded by our iOS application in the simulator. Open AppDelegate.m
in Xcode and take a look at the following code and comments:
* Loading JavaScript code - uncomment the one you want. * * OPTION 1 * Load from development server. Start the server from the repository root: * * $ npm start * * To run on device, change `localhost` to the IP address of your computer * (you can get this by typing `ifconfig` into the terminal and selecting the * `inet` value under `en0:`) and make sure your computer and iOS device are * on the same Wi-Fi network. */ jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"]; /** * OPTION 2 * Load from pre-bundled file on disk. To re-generate the static bundle * from the root of your project directory, run * * $ react-native bundle --minify * * see http://facebook.github...