In this unit, you set up a developer environment to build React Native app using Salesforce Mobile SDK. You'll install quiet a lot of tools but the good news is that it's just one time setup. And after that, you'll be able to build complex Native apps using mainly React and JavaScript knowledge.
open
to open Xcode.Note: Latest Xcode version is: 7.2
Salesforce Mobile SDK's forceios tool, React and React Native all need node.js. Install Node.js if you don't have it yet.
node -v
, you should see current Node version.Now, type npm -v
, you should see npm's(Node Package Manager) current version.
npm
is a command line tool that is installed as part of Node.js installation and is used to install various node.js libraries.
Homebrew is a popular repository for 1000s of OS X applications like Node.js, MongoDB, etc. React Native recommends installing several tools like Watchman
and Flow
.
Follow instructions on the site to install it.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
CocoaPods is a dependency manager for Objective-C and Swift projects. It's similar to 'npm' in the Node.js World. Salesforce Mobile SDK uses CocoaPods to install several iOS libraries.
sudo gem install cocoapods
brew install watchman
sudo npm install react-native-cli -g
Install forceios
tool by running: sudo install forceios -g
Watchman file watching is used to by React Native to monitor development changes and instantly convert them to a Native app.