React Native becoming very popular among Android and iOS developer because of its cross platform native development technique. React native is now doing what is impossible few years back but now its a complete game changer technique, which would soon change the development arena and any one can developer both android and iOS apps using single language.
This tutorial is for all the beginners who is thinking to learn React Native. So using this tutorial you can complete your first task to install Install React Native on MAC ( MACINTOSH ) system and create your first React Native project and run that project in real iOS device or iOS emulator. If you use windows system then you can also read my this tutorial. So lets get started .
Step 1. Install Homebrew :
Homebrew is a type of platform dependency installation software which would allow us to install all the download and install all the required files. To install Homebrew open you terminal prompt and type the below command :
1
|
/usr/bin/ruby –e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
|
Step 2. Install Node.js :
Next step is to install the node.js online using command.
1
|
brew install node
|
Step 3. Install watchmen :
1
|
brew install watchman
|
Step 4. Install React Native CLI :
1
|
npm install –g react–native–cli
|
Step 5. install Xcode command line tools :
To install the latest version on Xcode you need to follow the below steps :
Open Xcode -> Preferences -> Locations tab -> install latest version of Xcode command line tools.
Step 6. Create your first react native project in MAC :
1
|
react–native init MyProject
|
Step 7. Run your created project
1
2
|
cd MyProject
react–native run–ios
|
Screenshot :
Here you go guys, Now you have successfully created your first React Native project in MAC. To start editing your project just open the index.ios.js file. Feel free to share your thoughts via comments .