Use React Native Packager xcode script for build phase #778
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refs #752 - #765 seemed to get a build phase compiling main.jsbundle working for me, but not others (#777). It seems like the code I left out of the build phase (which I was copying from
node_modules/react-native/packager/react-native-xcode.sh) is important -- I suspect it's required the relevant JS properly on the simulator.The build phase code is from new changes made here to
local-cli/generator-ios/templates/xcodeproj/project.pbxproj: facebook/react-native#5518This PR only works by manually updating your
node_modules/react-native/packager/react-native-xcode.shwith the latest changes per that PR (from today): https://github.com/facebook/react-native/blob/d3e44143f6643662432960d156e93c3e1a49781d/packager/react-native-xcode.sh. Pasting the code into your local should get the build script to run. Hacking the packager script locally should no longer be needed upon the next 0.19.0 release (though we'll need to update our package.json dependencies as per changes in this PR). Will keep #777 open until then.Note: moved
index.io.jsto the root directory to make this work out of box better -- thereact-native-xcode.shfile always seems to look at index.ios.js (having trouble specify theReactComponentfolder without modifying the .sh script locally)cc @jonuy @lkpttn