硬件開發環境:Mac電腦
1.按照react-native中文文檔進行安裝
https://reactnative.cn/docs/getting-started/
2.iso報錯
2.1 運行react-native run-ios報錯Error: Could not find iPhone X simulator
由於沒有找到iPhone X模擬器,不清除爲啥XCode並沒有自帶
解決辦法:react-native run-ios --simulator="iPhone 8"
2.2 error Failed to build iOS project. We ran “xcodebuild” command but it exited with error code 65
解決辦法:
- cd /ios
- run
pod install
- cd ..
- delete build folder
- run
react-native run-ios