1For macOS:
2Go to Terminal:
3sudo npm i -g react-native-cli
4Enter password
5react-native init My_Application
1// Select a folder whereyou want to save the project
2//go into that folder
3
4cd React_Native_Projects
5//to avoid some future problems when starting the simulator, i installed cocoapods in the general folder for all the projects (i didn't have it installed)
6sudo gem install cocoapods
7
8//create the new react native project
9react-native init react-project //project with the name 'react-project'
10
11//go into the project folder
12cd react-project
13
14//you can now lauch the simulator
15react-native run-ios
16
17//if you run into the error 'Failed to build iOS project. We ran 'xcodebuild' command but it exited with error code 65'
18//try doing this
19cd ios
20pod install
21rm -rf build/
22cd ..
23react-native run-ios
24
25
26
27
28