오랜만에 react-native project 를 빌드 및 배포를 해야 해서 작업 중에 android, ios 둘 다 빌드를 실패하는 경이로운 일이 생겨서 무려 2시간을 허공에 던져버렸다.
이번에 각 case 별로 issue 를 정리하고 후에 관련 issue 및 내용을 더 찾아보던가 말던가 해야겠다.
npm run react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/build/intermediates/res/merged/release/ && rm -rf android/app/src/main/res/drawable-* && rm -rf android/app/src/main/res/raw/* && cd android && ./gradlew assembleRelease && cd ..
커맨드를 알려줬고 이걸로 빌드해서 apk file 을 뽑아낼 수 있었다. npm run react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --assets-dest='./ios/' --dev=false --platform='ios'
해당 Command 를 실행했는데 아무 이슈가 없어서 Xcode 에서 Archive 후 Distribute 하려고 했는데 Bundle File 을 찾지 못했다. Xcode 에서 빌드했더니 #import <RCTAppDelegate.h> not found error 가 뜬다.