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.
Open https://reactnative.dev/docs/environment-setup?platform=ios&os=macos
Select Development OS -macOS , Target OS - ios
Do you have Homebrew installed?
open the terminal in your Mac
paste the below line and hit enter
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew is installed
in the terminal paste the following code and hit enter
brew install node
brew install watchman
Now Xcode & command line tools need to be installed
Open App store & search for xcode
install it and open it
it will ask for user agreement prompt : accept it
Now go to terminal again & paste the below code
- xcode-select --install
Now you need to install Cocoapods
You need to install /update ruby
- brew install ruby
sudo gem install cocoapods
In case you encounter any errors, kindly visit chat.openai.com and paste the complete error message there for assistance.
You will be provided with the subsequent steps, and it is advised to diligently follow them.
Once cocoapods is installed properly
In terminal npx react-native@latest init FirstProject
npx react-native run-ios
Now your app should be running on ios simulator