Red screen of death:
http://screencast.com/t/VqeuVMwPSM
Commented out:
// sourceURL = [NSURL URLWithString:@"http://localhost:8081/Examples/UIExplorer/UIExplorerApp.ios.bundle?platform=ios&dev=true"];
Tried both of these:
sourceURL = [NSURL URLWithString:@"http://192.168.1.92:8081/Examples/UIExplorer/UIExplorerApp.ios.bundle?platform=ios&dev=true"];
sourceURL = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
My react versions:
"name": "react-native",
"version": "0.0.0-master",
@brentvatne tried:
$: git clean -dfx
$: npm i && npm start
Product > Clean in Xcode
Then recompiling
UIExplorer runs fine in simulator and my other project runs fine in simulator and phone.
Please advise and thank you in advance for your time!
@andresn I got the same error too, it occurred because no generated javascript bundle inside the project. So you just need to do according to the comments in AppDelegate.m:66
While the server is running,
$ curl 'http://localhost:8081/Examples/UIExplorer/UIExplorerApp.ios.bundle?platform=ios' -o main.jsbundle
then add the main.jsbundle file to your project.
@facebook-github-bot answered
Closing this issue as @dsibiski says the question asked has been answered. Please help us by asking questions on StackOverflow. StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only.
ah, thanks @turboza!
Thank @turboza, just in case it might help someone, I had to add the /js to the command line path to have it working :
$ curl 'http://localhost:8081/Examples/UIExplorer/js/UIExplorerApp.ios.bundle?platform=ios' -o main.jsbundle
Shouldn't the README be updated on the instructions for running on a device? The current README for UIExplorer doesn't mention this and just points the reader to https://facebook.github.io/react-native/docs/running-on-device-ios.html. The docs page for running on device doesn't mention anything about generating the bundle.
Out of curiosity, is this a general issue with building for devices or specific to the UIExplorer project? I presume that react-native init <project> would normally create the missing bundle?
Btw, there is currently no comment on line 66 of appDelegate.m. I should comment by saying I'm not an objective c developer and not familiar with Xcode. So feel free to use me as a use case of the difficulties for a non objective c dev to get up to speed with react-native and use the UI Examples.
Most helpful comment
Shouldn't the README be updated on the instructions for running on a device? The current README for UIExplorer doesn't mention this and just points the reader to https://facebook.github.io/react-native/docs/running-on-device-ios.html. The docs page for running on device doesn't mention anything about generating the bundle.
Out of curiosity, is this a general issue with building for devices or specific to the UIExplorer project? I presume that
react-native init <project>would normally create the missing bundle?Btw, there is currently no comment on line 66 of appDelegate.m. I should comment by saying I'm not an objective c developer and not familiar with Xcode. So feel free to use me as a use case of the difficulties for a non objective c dev to get up to speed with react-native and use the UI Examples.