React native development environment configuration (MAC + IOS) Official Document translation summary

Source: Internet
Author: User
Tags install homebrew administrator password install node


The configuration of the environment depends on the operating platform you are applying, IOS, Android, or both. You just need to choose one, because different environments are just a little different when you are in Setup. The following is an environment configuration that is run on the IOS system using Mac. Environment Configuration



Development tools: Xcode, node.js, react Native command line tools, Watchman.
It is officially recommended that you use Homebrew to install node and watchman. Install Homebrew



Installation of the official website prompts the following command to copy directly to the terminal. Then you will be prompted "press RETURN to continue or any of the other key to abort
“. You can press return and then ask for an administrator password. The following interface will appear after the success.



! []http://7xpl1c.com1.z0.glb.clouddn.com/063baa23-8755-40cb-9e90-c5e3e4c1b1b7.png Note: If there are any problems, you can go directly to the official website there are various solutions. Installing node



After installing Homebrew, execute the following command:


/usr/bin/ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"

 
Brew Install node
Brew install Watchman


Node has NPM, allowing you to install the React Native command-line interface directly.


sudo npm install-g react-native-cli


Installation prompts you to enter a password to install successfully. Note: If you encounter the "Cannot find module ' npmlog '" error, first perform the following name


curl-0-L http://npmjs.org/install.sh | sudo sh
Install Xcode


Just go to the Mac App Store to download it. testing the installation of React Native



The following is the creation of a project called "Awesomeproject" using react Native. And then use the "react-native run-ios" command to run the project in that directory


React-native init awesomeproject
cd awesomeproject
react-native Run-ios


Of course you can run it directly using Xcode or nuclide. Modify App



Now that we have successfully run the app, let's modify it to open index.ios.js change its contents use command⌘+ R to reload the iOS emulator other



For other operating systems or Android development please read the following articles


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.