Example
Installing package manager Homebrew
brew
Paste that at a Terminal prompt.
![Native Native](/uploads/1/2/5/3/125384898/677830630.png)
Installing Xcode IDE
- Jun 18, 2017 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.
- Dec 25, 2019 Step 3: Run your React Native app with 'react-native run-android' command. The last and final step is to run your React Native app in the opened Android emulator. To do so, open Visual Studio Code (or your preferred code editor) then click 'Open Folder' and open the root directory of your React Native app (not the Android directory).
Download it using link below or find it on Mac App Store
NOTE: If you have Xcode-beta.app installed along with production version of Xcode.app, make sure you are using production version of
xcodebuild
tool. You can set it with:Sep 16, 2016 Learn how to install React Native on Mac OS X and how to run your first application on Android and iOS. We’ve seen how to install and configure react-native to develop the app on Mac. Also, We’ve created the app by React Native CLI and executed it to check the environment is configured well. Now, we are ready to develop the app with react-native. Let’s dive to the react-native development world!
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/
Installing Android environment
- Git
git
*If you have installed XCode, Git is already installed, otherwise run the following
How To Download React Native For Mac Download
- Choose a Custom installationChoose both Performance and Android Virtual DeviceAfter installation, choose Configure -> SDK Manager from the Android Studio welcome window.In the SDK Platforms window, choose Show Package Details and under Android 6.0 (Marshmallow), make sure that Google APIs, Intel x86 Atom System Image, Intel x86 Atom_64 System Image, and Google APIs Intel x86 Atom_64 System Image are checked.In the SDK Tools window, choose Show Package Details and under Android SDK Build Tools, make sure that Android SDK Build-Tools 23.0.1 is selected.
- Environment Variable
ANDROID_HOME
Ensure the ANDROID_HOME environment variable points to your existing Android SDK. To do that, add this to your ~/.bashrc, ~/.bash_profile (or whatever your shell uses) and re-open your terminal:If you installed the SDK without Android Studio, then it may be something like: /usr/local/opt/android-sdk
Dependencies for Mac
You will need Xcode for iOS and Android Studio for android, node.js, the React Native command line tools, and Watchman.
![Mac Mac](/uploads/1/2/5/3/125384898/450692550.png)
We recommend installing node and watchman via Homebrew. Download the taisho tripitaka cbeta for mac.
Watchman is a tool by Facebook for watching changes in the filesystem. It is highly recommended you install it for better performance. It is optional.
Node comes with npm, which lets you install the React Native command line interface.
If you get a permission error, try with sudo:
For iOS the easiest way to install Xcode is via the Mac App Store. And for android download and install Android Studio.
If you plan to make changes in Java code, we recommend Gradle Daemon which speeds up the build.
Testing your React Native Installation
Use the React Native command line tools to generate a new React Native project called 'AwesomeProject', then run react-native run-ios inside the newly created folder.
You should see your new app running in the iOS Simulator shortly. react-native run-ios is just one way to run your app - you can also run it directly from within Xcode or Nuclide.
Modifying your app
Now that you have successfully run the app, let's modify it.
- Open index.ios.js or index.android.js in your text editor of choice and edit some lines.
- Hit Command⌘ + R in your iOS Simulator to reload the app and see your change! That's it!
Congratulations! You've successfully run and modified your first React Native app.
source: Getting Started - React-Native
Related Tags