5

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
4

1 回答 1

11

我忘记将文件添加到项目中。

您需要右键单击项目名称并选择“将文件添加到 MyProject...”。然后选择main.jsbundle。构建项目,它应该可以工作。

于 2015-03-31T17:06:52.197 回答