React Native apps require a lot of files open at once, so you need to up the allotment for your Mac's OS.
$ sudo atom -a /etc/sysctl.conf;
kern.maxfiles=10485760
kern.maxfilesperproc=1048576
Needs to be 8.5 or above
$ node -v;
node update via brew
$ brew update;
$ brew upgrade node;
needs to be 4.6.1
$ npm -v;
5.3.0
$ npm i -g [email protected];
$ npm -v;
4.6.1
$ git clone [email protected]:kmccarth/va-react-native.git ~/va-react-native;
Optional: branching off master
$ cd ~/va-react-native;
$ export MYFIRSTNAME="EDIT_THIS_VALUE"
$ git checkout -b $MYFIRSTNAME;
$ cd ~/va-react-native;
$ npm install;
"Expo apps are React Native apps which contain the Expo SDK. The SDK is a native-and-JS library which provides access to the device’s system functionality (things like the camera, contacts, local storage, and other hardware). That means you don’t need to use Xcode or Android Studio, or write any native code, and it also makes your pure-JS project very portable because it can run in any native environment containing the Expo SDK."
Basically, you can dev locally on your mac, hit save, then see the results on your iPhone or Android phone. No Xcode, no recompiles. But the devices (phone/Mac) need to be on same wifi.
On your iOS device, go to the App store to download the Expo app.
On Mac, run the following:
$ npm start;
When you see the QR code, open up the Expo iOS app. Use "Scan QR code" feature and hover-over the QR code printed to your Mac terminal
Open up ~/va-react-native/App.js and change the language of "Shake your phone" to "Shake your rumpba", save the file and viola!
With this, you can create new apps very easily
$ cd ~;
$ npm i -g create-react-native-app;
$ cd ~;
$ create-react-native-app MyAwesomeProject;
$ cd MyAwesomeProject;
$ npm start;
Unnecessary, but nice to have for down the road.
$ npm i -g react-native-git-upgrade;