mjohnston / react-native-webpack-server

Build React Native apps with Webpack
MIT License
933 stars 84 forks source link

Unable to execute JS call: __fbBatchedBridge is undefined #158

Closed Darmody closed 8 years ago

Darmody commented 8 years ago

run the rnws bundle to generate the main.jsbundle file and uncomment the line jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; in the AppDelegate.m file.

After all, run the app in my iphone through Xcode, it get the error:

Unable to execute JS call: __fbBatchedBridge is undefined

Did I miss something?

philikon commented 8 years ago

Make sure main.jsbundle is in fact bundled with your app. When using the React Native packager, react-native-xcode.sh takes care of that. When using rnws, it depends on your setup. A common solution is to simply add main.jsbundle to the XCode tree.

philikon commented 8 years ago

Closing this issue for now since it's not really related to rnws. Please reopen with more details if you can confirm it's a rnws issue.