expo managed에서 bare 프로젝트로 변경 후 빌드하기

뱀기·2022년 9월 9일
0

Nurihaus

목록 보기
7/13

어느정도 빌드가 끝난 후에 작성하는 글이라 기억이 나질않는다...! 기억이 나거나 추가적으로 발생하는 에러에 대해서 꼭 기록을 해야겠다.

  1. expo prebuild 명령어로 ios android 폴더 생성

    1.1 pod install이 최초 실행시 호환성의 문제로 fail한다.

    sudo gem install ffi
    arch -x86_64 pod install

// 그래도 안되면 하고 다시 위에 실행
sudo gem uninstall cocoapods
sudo brew install cocoapods



1.2 error: Command failed with exit code 1

rm -rf node_modules
rm -rf yarn.lock
yarn cache clean
yarn && yarn start


1.3 xcodebuild: command failed with exit code 65

xcode 버전을 다운 시켰더니 해결 (13.3.1사용중)


1.4 기타

사용하는 라이브러리의 버전확인 필요
RN firebase 적용시 firebase/app과 firebase/messaging의 버전이 일치해야 빌드시 에러가 발생하지 않는다.


2. ios build 
2.1 prebuild 이후 xcode로 archive 진행.
2.2 xcode > preferences > account에 apple dev아이디가 등록되어있는지 확인 후 app에 등록하기. pod에도 등록해야함.
2.3 pod에 use_flipper!() 사용 X

use_frameworks! :linkage => :static


2.4 main.jsbundle이 없다면

"react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios'"


3. android build

apk: "build:android": "cd android && ./gradlew assembleRelease",
bundle: "build:bundle": "cd android && ./gradlew bundleRelease"

 

0개의 댓글