1. React Native .dev/docs/environment steps
2. React native CLI quickstart
Development OS : MacOS
Target OS : ios
3. Installing dependencies
Install homebrew
https: // brew.sh/
url Copy & Paste into terminal Enter password into terminal
4. $brew install node
$brew install watchman
5. Install XCode
Preferences
- Location(tab)
- Click command into tools
- Select latest Version
Go to Components (tab)
-Simulator Select & Download
6. Click on link 'Cocopods'
https://cocopods.org/
Copy cmd : sudo gem install cocoapods
Paste into terminal : install with password
BEFORE INSTALL RUBY LATEST Version
How to install Ruby on MacOS ?
Step 1 : Check if ruby is already installed
ruby -v
To install ruby we use RVM
1. To install RVM, following steps
GEM is a Dependency of RUBY
#gem env -> display ruby details
2. To check cocoapods version
1. sudoless
gem which cocoapods
2. sudo
sudo gem which cocoapods (1.11.3)
To check Ruby installed
-rvm list rubies
-rvm list known
-rvm install 3.0.0
-rvm ruby use 1.2.7
-which ruby
Reference : inlogixinforway.com
Step 2 : get Homebrew
brew -v
Step 3 : Install Ruby
brew install ruby
Step 4 : Add Ruby in PATH env variables
echo 'export PATH='/usr/local/opt/ruby/bin: $PATH">> ~/.bash_profile'
7. brew install cocoapods ( or ) sudo gem //install cocoapods -v 1.8.4
* if / when prompted type "Y" to complete
8. Go to directory of project \> cd "Folder Name"
9. Create new application
npx react-native init10. npm install react-native-cli
11. Before run project , we need to compile the POD file
$> cd ios
applie which uses the pod to compile and run the necessary library as needed for the porject,
so to ge it up run for the mac you have to
$> pod install
12. Go to parent folder $cd ..
Now run the command
$ react-native run-ios
----
# XCode Path locations
Derived Data : /users/mac/Library/Developer/XCode/DerivedData
Archives : .../library/Developer/XCode/Archieves
Command Line tools : /users/mac/Downloads/Xcode.app---
Twwo way to run React Native in MacOS
1. react-native run-ios
2. XCode, click the Run button
----
# To kill node in mac
$ kill -9 $(lsof-fi: 8081)# privacy document website
privacypolicy.com----
To get react-native information
# react-native info
#yarn react-native info-----
NPM Shell
* For mac shell, ther are two type
1. zsh
2. bashRoot Dir : cd ~
cd /
usr/opt/users/etc/bin/library# npm -g list
/users/mac/.nvm/versions/node/v17.6.0/lib# xcode build settings
Target -> Project -> Build Setting
Excluded Architeture
Debug / Relese - arm64
Any ios simulator SDK - i386---
Error : react-native command not found
1. brew --version
2. brew info watchman
3. brew info flow
4. brew info node
5. npm --version=> "react-native -v" for version check
=> "npx react-native info"