Top

RUN AND UPDATE DEPENDENCY

Welcome to React Native ! React Native helps you build modern applications.

For getting started an React Native application you needs two things as Prerequisites.

Prerequisites

To develop and run React Native applications, you need to have the following prerequisites:

1. Node.js and npm: React Native requires Node.js and npm (Node Package Manager) to be installed on your machine. You can download and install them from the official Node.js website: https://nodejs.org/


2. Java Development Kit (JDK): React Native requires JDK to be installed in order to compile and build the Android app. You can download and install the latest version of JDK from the Oracle website: https://www.oracle.com/java/technologies/javase-jdk14-downloads.html


3. Android Studio: If you want to develop and test Android applications, you need to install Android Studio. It provides the necessary tools, SDKs, and emulators for Android development. You can download and install it from the official Android Studio website: https://developer.android.com/studio


4. Xcode: If you want to develop and test iOS applications, you need to have Xcode installed on your macOS machine. Xcode is the official IDE for iOS development. You can download and install it from the Mac App Store.


5. Watchman: Watchman is a tool provided by Facebook that watches for changes in the files and triggers rebuilds. It is recommended to install Watchman for a better development experience. You can install it using Homebrew (for macOS) or Chocolatey (for Windows).


6. React Native CLI: React Native CLI is a command-line interface tool that helps in creating, building, and running React Native projects. You can install it globally using npm: npm install -g react-native-cli


These are the main prerequisites for React Native development. Once you have installed these, you can start creating and running React Native applications on your machine.


These are basic commands to run & build React Native project.


  1. To create a new React Native project:
    npx react-native init projectName
  2. To run the React Native project on an Android emulator or device:
    npx react-native run-android
  3. To run the React Native project on an iOS simulator or device:
    npx react-native run-ios
  4. To build a standalone Android APK file for release:
    cd android
    ./gradlew assembleRelease
    
  5. To build a standalone iOS IPA file for release:
    cd ios
    xcodebuild -workspace projectName.xcworkspace -scheme projectName -configuration Release -archivePath projectName.xcarchive archive
    xcodebuild -exportArchive -archivePath projectName.xcarchive -exportOptionsPlist exportOptions.plist -exportPath ./build