콘텐츠로 이동

심볼 파일 업로드

심볼 파일 자동 패키징

심볼 파일 자동 패키징 스크립트 추가

스크립트 도구: react-native-mobile-cli

react-native-mobile-cli는 릴리스 빌드 시 React Native 및 Native 소스맵을 자동으로 가져와 zip 파일로 패키징하는 데 사용됩니다.

로컬 파일 방식으로 package.json의 개발 의존성에 추가합니다.

"devDependencies": {
"@cloudcare/react-native-mobile-cli":"file:./ft-react-native-mobile-cli-v1.0.0.tgz"
}

추가한 후 yarn install을 실행합니다.

참고: Android 환경에서는 Gradle Plugin ft-plugin을 구성해야 하며, 버전 요구 사항은 >= 1.3.4입니다.

프로젝트 메인 모듈 app의 build.gradle 파일에 Plugin과 파라미터 설정을 추가합니다:

apply plugin: 'ft-plugin'
FTExt {
    //showLog = true
    autoUploadMap = true
    autoUploadNativeDebugSymbol = true
    generateSourceMapOnly = true
}

구성 명령어 실행

React Native 프로젝트 디렉터리에서 yarn ft-cli setup을 실행하여 릴리스 빌드 시 React Native 및 Native 소스맵을 자동으로 가져와 zip 파일로 패키징할 수 있도록 합니다.

➜  example git:(test-cli) ✗ yarn ft-cli setup
yarn run v1.22.22
$ /Users/xxx/example/node_modules/.bin/ft-cli setup
Starting command: Setup to automatically get react-native and native sourcemap in release build and package them as zip files.
Running task: Add a Gradle Script to automatically zip js sourcemap and Android symbols
Running task: Enable react-native sourcemap generation on iOS
Running task: Setup a new build phase in XCode to automatically zip dSYMs files and js sourcemap


Finished running command Setup to automatically get react-native and native sourcemap in release build and package them as zip files.

✅ Successfully executed: Add a Gradle Script to automatically zip js sourcemap and Android symbols.
✅ Successfully executed: Enable react-native sourcemap generation on iOS.
✅ Successfully executed: Setup a new build phase in XCode to automatically zip dSYMs files and js sourcemap.
✨  Done in 1.00s.

릴리스 빌드 후 패키징된 zip 파일 경로:

  • iOS: ./ios/sourcemap.zip
  • Android: ./sourcemap.zip

심볼 파일 수동 패키징

React Native Zip 패키지 패키징 방법

업로드

zip 파일을 생성한 후 공용 네트워크 DataWay를 통해 해당 SourceMap 파일을 업로드하세요.

자세한 내용은 다음을 참조하세요:

애플리케이션이 CodePush 등 OTA 방식으로 JavaScript 핫 업데이트를 제공하는 경우, 핫 업데이트 SourceMap 버전 매칭도 함께 참조하여 마더 패키지와 각 핫 업데이트 패키지에 대해 각각 해당 버전의 SourceMap을 구성하고 업로드하세요.

릴리스 패키지 관련 설정

Android

iOS

문서 평가

이 페이지가 도움이 되었나요?