On the iPhone simulator everything works fine. When building the App for the iPhone i get the error:
A bundleURL is required to create an RCTRootView
In the AppDelegate.m i uncomment the following line;
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
And downloaded the prebuild main.jsbundle to the iOS folder in the project root:
curl http://localhost:8081/index.ios.bundle -o main.jsbundle
React Native combines the best parts of native development with React, a best-in-class JavaScript library for building user interfaces. Use a little—or a lot. You can use React Native today in your existing Android and iOS projects or you can create a whole new app from scratch.
React Native is the best choice if you: It is necessary to develop an application for both iOS and Android platforms, with limited resources and a small team; Your app needs to look and work the same on both iOS and Android; Need live or hot reload and faster time to develop the application.
I forgot to add the file to the project.
You need to right-click on the project name and select "Add files to MyProject…". Then choose the main.jsbundle. Build the project and it should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With