Summary:
addition to #7297
When called from an upstarting app, the bundling process should always be called with a cleared cache. That avoids possible problems with cached files.
Closes https://github.com/facebook/react-native/pull/7324
Differential Revision: D3247420
fb-gh-sync-id: 503ad39cb36455512ccea1af7618e89a80942f0c
fbshipit-source-id: 503ad39cb36455512ccea1af7618e89a80942f0c
Summary:Remove Trailing Spaces.
Why:
Sometimes there are conflicts with trailing spaces
Saves space
Those whose tools automatically delete them will have their pr watered down with trailing space removal
Closes https://github.com/facebook/react-native/pull/6787
Differential Revision: D3144704
fb-gh-sync-id: d8a62f115a3f8a8a49d5b07f56c540a02af38cf8
fbshipit-source-id: d8a62f115a3f8a8a49d5b07f56c540a02af38cf8
Summary:**Problem**: As seen in https://github.com/facebook/react-native/issues/5820, many devs are confused by the fact that the offline bundle is not generated when running against the simulator, even when running in the "Release" configuration which is supposed to mimic "production" scenarios.
This pull request is a small change that fixes https://github.com/facebook/react-native/issues/5820 by updating the `react-native-xcode.sh` shell script to still generate the ofline bundle during Release configuration. It also updates `AppDelegate.m` to better document this behaviour in the comments so as to avoid any surprises.
**Test plan**: This is a simple change, the two tests done were
1. In a new React Native project, verify that an offline build is not generated when running against the simulator in "Debug" configuration as per normal.
2. Change to a "Release" configuration via Product > Scheme > Edit Scheme in XCode, then verify that the project runs with the offline build generated.
![screen shot 2016-02
Closes https://github.com/facebook/react-native/pull/6119
Differential Revision: D2970755
Pulled By: javache
fb-gh-sync-id: 64f658512869c73aa19286ca1e3dc6e31b5ac617
shipit-source-id: 64f658512869c73aa19286ca1e3dc6e31b5ac617
Summary:
`react-native-xcode.sh` can fail to execute if `$REACT_NATIVE_DIR` contains spaces.
E.g. if `$REACT_NATIVE_DIR` was `/Users/samn/src/Xcode Projects/AwesomeReact` then `react-native-xcode.sh` would fail with the following error:
```
node /Users/samn/src/Xcode Projects/ReactNativeBeaconTest/node_modules/react-native/local-cli/cli.js bundle .... (elided)
module.js:341
throw err;
^
Error: Cannot find module '/Users/samn/src/Xcode'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Function.Module.runMain (module.js:447:10)
at startup (node.js:139:18)
at node.js:999:3
Command /bin/sh failed with exit code 1
```
This change properly handles paths with spaces in them by quoting `$REACT_NATIVE_DIR`
Closes https://github.com/facebook/react-native/pull/5651
Reviewed By: svcscm
Differential Revision: D2884600
Pulled By: androidtrunkagent
fb-gh-sync-id: 3784d8f4e16c0c2cadac738c5f085a5023b5ecf7
Summary:
This fixes an error introduced in `0.18.0-rc`
`node` and `npm` isn't available if the developer is using `nvm` or `nodeenv`. XCode throws an error because of the call to `npm`. Simple move the line to after `node` and `npm` has been setup.
Closes https://github.com/facebook/react-native/pull/5156
Reviewed By: svcscm
Differential Revision: D2807589
Pulled By: androidtrunkagent
fb-gh-sync-id: 30c33145b2cb6f30ff67f6648153d5aa67fb74ed
Summary:
Hello!
I'm a fan of the *env family of version managers over the *vm family as I find them simpler and less obtrusive, but it seems that they don't currently work so well with react-native on OSX. See #4645
I've made a small addition to the xcode script that resolves the issue for me. Hopefully others will find this useful too :)
If I've not made the right move here, what is the correct way to get react-native projects building in xcode when the binary is not in the $PATH used by the script?
Cheers,
Louis
Closes https://github.com/facebook/react-native/pull/4801
Reviewed By: svcscm
Differential Revision: D2770726
Pulled By: androidtrunkagent
fb-gh-sync-id: 3b0f9e466549b3012a68c94738d2556173f4c21e
Summary:
Related to issue https://github.com/facebook/react-native/issues/4034#issuecomment-164134543.
The npm global install path may be set to a non-standard location. `react-native` is assumed to be in `PATH` but doesn't take into account the user's environment so building in Xcode fails:
~~~
react-native bundle --entry-file index.ios.js --platform ios --dev true --bundle-output [...]
../node_modules/react-native/packager/react-native-xcode.sh: line 48: react-native: command not found
Command /bin/sh failed with exit code 127
~~~
This fix uses `npm prefix -g` to get the bin location and adds it to `PATH`.
Closes https://github.com/facebook/react-native/pull/4749
Reviewed By: svcscm
Differential Revision: D2753215
Pulled By: androidtrunkagent
fb-gh-sync-id: 964d1a71ac1bf204545a594a9fa433a7bc367f35
Summary: When Node is installed with nvm, scripts invoked from Xcode need to set up nvm. This can be done either by sourcing .profile/.bash_profile/.bashrc/etc... or by sourcing nvm.sh directly -- this diff does the latter and handles the case where nvm may have been installed the official way (under ~/.nvm/nvm.sh AFAIK) or via homebrew.
Closes https://github.com/facebook/react-native/pull/4015
Reviewed By: svcscm
Differential Revision: D2633301
Pulled By: frantic
fb-gh-sync-id: 3c2b9b0d21887ba21d6f85f5d279314d50c1db28