MacOS Monterey 12.4
Xcode 13.4.1
brew 3.5.9
node 16.15.1
npm 8.11.0
watchman 2022.08.15.00
react-native-cli 2.0.1
pod 1.11.3
openjdk 11.0.11
javac 11.0.11
iterm2 를 열어 전역으로 react-native-cli 를 설치해준다
sudo npm install --location=global react-native-cli
npx react-native init frontend
cd frontend/ios && pod install
cd ios
pod deintegrate
pod install
원인: Xcode 앱을 실행할 때, build를 할 때 architecuture 를 제대로 빌드 할 수 없다.
해결: 생각해보니 architecture를 제대로 설치해준 적이 없어서 아래와 같이 architecuture를 설치 해줌으로써 해당 문제를 해결하였다.
sudo arch -x86_64 gem install ffi
cd frontend/ios
arch -x86_64 pod install
npm run ios
https://reactnative.dev/docs/environment-setup
https://qnrjs42.blog/react-native/m1-arm64-setting
https://wiwi-pe.tistory.com/168