심볼 파일 업로드¶
자동 패키징 심볼 파일¶
심볼 파일 자동 패키징 스크립트 추가¶
스크립트 도구: react-native-mobile-cli
react-native-mobile-cli는 릴리즈 빌드 시 React Native 및 Native sourcemap을 자동으로 가져와 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 sourcemap을 자동으로 가져와 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
수동 패키징 심볼 파일¶
업로드¶
zip 파일이 생성된 후, 공용 DataWay를 통해 해당 SourceMap 파일을 업로드합니다.
자세한 내용은 다음을 참조하세요: