Conversation
- ios/Gemfile: Fastlane 버전 고정 - ios/fastlane/Appfile: 앱 설정 (ID, 팀, 이메일) - ios/fastlane/Fastfile: beta/release lane 구현 * App Store Connect API Key 기반 인증 * IPA 빌드 후 TestFlight/App Store 배포 - Makefile: iOS 배포 명령어 추가 * make setup-ios-deploy: Fastlane 설치 * make deploy-ios: TestFlight 배포 * make deploy-ios-appstore: App Store 제출 - .gitignore: Fastlane 생성물 무시 패턴 추가 팀원은 서브모듈 env에 ASC_KEY_* 값만 추가하면 make deploy-ios 한 줄로 배포 가능 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
iOS 배포를 Fastlane + Makefile로 자동화해 팀원이 환경변수만 설정하면 TestFlight/App Store 배포를 실행할 수 있게 하는 PR입니다. 동시에 image_picker 권한 정책 변경에 맞춰 iOS/Android 쪽 앨범 권한 처리도 함께 정리되었습니다.
Changes:
- iOS Fastlane 설정(Fastfile/Appfile) 및 Ruby 의존성(Gemfile/Gemfile.lock) 추가
make setup-ios-deploy,make deploy-ios(-testflight),make deploy-ios-appstore배포 커맨드 추가- 앨범 접근 관련 권한/핸들러 로직 조정(iOS 브릿지 핸들러, AndroidManifest)
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/bridge/handlers/media_bridge_handler.dart | 앨범 권한 사전 체크 로직 제거로 image_picker 동작 방식에 맞춘 흐름 정리 |
| ios/fastlane/Fastfile | ASC API Key 기반 인증 + TestFlight/App Store 업로드 lane 추가 |
| ios/fastlane/Appfile | App ID/계정/팀 설정을 환경변수 기반으로 구성 |
| ios/Gemfile | fastlane 의존성 추가 |
| ios/Gemfile.lock | fastlane 및 관련 gem lockfile 추가 |
| android/app/src/main/AndroidManifest.xml | Photo Picker 기반 전환을 반영해 일부 스토리지 권한 제거 처리 |
| Makefile | iOS 배포 자동화 타겟/헬퍼 추가 및 도움말에 배포 가이드 노출 |
| .gitignore | fastlane 산출물 및 IPA/심볼 압축 파일 ignore 추가 |
| fi | ||
| @ASC_KEY_ID=$$(grep '^ASC_KEY_ID=' .env.prod | cut -d '=' -f2); \ | ||
| ASC_ISSUER_ID=$$(grep '^ASC_ISSUER_ID=' .env.prod | cut -d '=' -f2); \ | ||
| ASC_KEY_BASE64=$$(grep '^ASC_KEY_BASE64=' .env.prod | cut -d '=' -f2); \ |
There was a problem hiding this comment.
[P0] .env.prod에서 값을 읽을 때 cut -d '=' -f2를 사용하면 base64 값에 = 패딩이 포함된 경우 뒤가 잘려서 ASC_KEY_BASE64가 손상됩니다. cut -d '=' -f2- 또는 sed 's/^ASC_KEY_BASE64=//'처럼 전체 값을 보존하도록 수정이 필요합니다.
| ASC_KEY_BASE64=$$(grep '^ASC_KEY_BASE64=' .env.prod | cut -d '=' -f2); \ | |
| ASC_KEY_BASE64=$$(grep '^ASC_KEY_BASE64=' .env.prod | cut -d '=' -f2-); \ |
| @export ASC_KEY_ID=$$(grep '^ASC_KEY_ID=' .env.prod | cut -d '=' -f2); \ | ||
| export ASC_ISSUER_ID=$$(grep '^ASC_ISSUER_ID=' .env.prod | cut -d '=' -f2); \ | ||
| export ASC_KEY_CONTENT=$$(grep '^ASC_KEY_BASE64=' .env.prod | cut -d '=' -f2 | base64 --decode); \ | ||
| export IPA_PATH=$$(ls build/ios/ipa/*.ipa 2>/dev/null | head -1); \ | ||
| cd ios && bundle exec fastlane beta |
There was a problem hiding this comment.
[P1] macOS 기본 base64는 --decode 옵션을 지원하지 않아 iOS 배포 환경(대부분 mac)에서 ASC_KEY_CONTENT 디코딩이 실패합니다. base64 -D(mac)와 base64 --decode(GNU)를 모두 처리하거나, python3 -m base64 -d 같은 플랫폼 독립적인 디코딩으로 바꾸는 게 안전합니다.
| @export ASC_KEY_ID=$$(grep '^ASC_KEY_ID=' .env.prod | cut -d '=' -f2); \ | ||
| export ASC_ISSUER_ID=$$(grep '^ASC_ISSUER_ID=' .env.prod | cut -d '=' -f2); \ | ||
| export ASC_KEY_CONTENT=$$(grep '^ASC_KEY_BASE64=' .env.prod | cut -d '=' -f2 | base64 --decode); \ | ||
| export IPA_PATH=$$(ls build/ios/ipa/*.ipa 2>/dev/null | head -1); \ |
There was a problem hiding this comment.
[P0] App Store 제출 타겟도 .env.prod 값을 cut -d '=' -f2로 파싱하고 있어 base64 값에 =가 있으면 잘립니다. TestFlight/Release 모두 동일하게 -f2-로 수정하지 않으면 배포가 환경에 따라 즉시 실패할 수 있습니다.
| "ASC_KEY_ID, ASC_ISSUER_ID, ASC_KEY_CONTENT 환경변수가 필요합니다.\n" \ | ||
| ".env.prod에 다음을 추가하세요:\n" \ | ||
| " ASC_KEY_ID=your_key_id\n" \ | ||
| " ASC_ISSUER_ID=your_issuer_id\n" \ | ||
| " ASC_KEY_BASE64=base64_encoded_p8_content" | ||
| ) |
There was a problem hiding this comment.
[P1] 에러 메시지에서 ASC_KEY_CONTENT가 필요하다고 하면서 예시에는 ASC_KEY_BASE64를 안내하고 있어 설정 시 혼동을 유발합니다. Makefile 흐름대로라면 .env.prod에는 ASC_KEY_BASE64를, Fastlane에는 ASC_KEY_CONTENT를 전달한다는 점이 드러나도록 메시지를 정리해 주세요.
변경 사항
make setup-ios-deploy,make deploy-ios,make deploy-ios-appstore명령어 추가테스트
make setup-ios-deploy실행 확인make deploy-ios테스트 배포 확인관련 이슈