Up & running 1st React Native app

One of the most difficult parts of react native development is the setup.

How to run iOS apps on Mac without iPhone using a simulator.

  1. Open https://reactnative.dev/docs/environment-setup?platform=ios&os=macos

  2. Select Development OS -macOS , Target OS - ios

  3. Do you have Homebrew installed?

    1. open the terminal in your Mac

    2. paste the below line and hit enter

    3.    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
      
    4. brew is installed

  4. in the terminal paste the following code and hit enter

    1. brew install node

    2. brew install watchman

  5. Now Xcode & command line tools need to be installed

    1. Open App store & search for xcode

    2. install it and open it

    3. it will ask for user agreement prompt : accept it

  6. Now go to terminal again & paste the below code

    1. xcode-select --install
  7. Now you need to install Cocoapods

    1. You need to install /update ruby

      1. brew install ruby
    2. sudo gem install cocoapods

    3. In case you encounter any errors, kindly visit chat.openai.com and paste the complete error message there for assistance.

    4. You will be provided with the subsequent steps, and it is advised to diligently follow them.

  8. Once cocoapods is installed properly

  9. In terminal npx react-native@latest init FirstProject

  10. npx react-native run-ios

Now your app should be running on ios simulator