Chore/#25 fastlane test fllight#26
Conversation
WalkthroughTestFlight 업로드 자동화를 위해 fastlane 빌드/배포 워크플로우를 구성했습니다. .gitignore에 iOS 앱 패키징 파일 패턴을 추가하고, Makefile에 release 대상을 정의하며, Fastfile의 release 레인에 인증서 동기화, 빌드, App Store Connect API 키 처리, TestFlight 업로드, dSYM 다운로드, Discord 알림 단계를 구현했습니다. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant Makefile
participant Fastlane as Fastlane (release)
participant Git as Git (match)
participant Xcode as Xcode Build
participant ASC as App Store Connect
participant TestFlight
participant dSYM as dSYM Service
participant Discord
User->>Makefile: make release
Makefile->>Fastlane: bundle exec fastlane release
Fastlane->>Git: match(type: appstore, readonly: true)
Git-->>Fastlane: Certificates synchronized
Fastlane->>Xcode: build_app (NDGL-iOS.xcworkspace)
Xcode-->>Fastlane: IPA + build artifacts
Fastlane->>ASC: app_store_connect_api_key
ASC-->>Fastlane: API key retrieved
Fastlane->>Git: match config with API key
Git-->>Fastlane: Provisioning profiles updated
Fastlane->>TestFlight: upload_to_testflight (API key)
TestFlight-->>Fastlane: Build uploaded
Fastlane->>dSYM: download_dsyms (API key)
dSYM-->>Fastlane: dSYMs downloaded
Fastlane->>Discord: send_discord_message (success)
Discord-->>User: Release notification
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
fastlane/Fastfile (1)
46-92:⚠️ Potential issue | 🟠 Major
match가 두 번 호출되며, 두 번째 호출은build_app이후에 위치하여 서명에 영향을 주지 않습니다.
- Line 49:
match(type: "appstore", readonly: true)— 빌드 전 인증서 동기화 (올바른 위치)- Lines 69-75:
match(git_url: ..., api_key: api_key, ...)— 빌드 후 다시 호출되므로 이미 완료된 빌드의 서명에 영향을 주지 않습니다.의도가
api_key를 사용한 인증서 동기화라면, 첫 번째match호출을api_key생성 이후,build_app이전으로 이동시키고 두 번째 호출을 제거해야 합니다.♻️ match 호출 순서 수정 제안
begin - # 1. 인증서 동기화 - match(type: "appstore", readonly: true) - - # 2. 앱 빌드 - build_app( - ... - ) - # API Key 방식 TestFlight 업로드 api_key = app_store_connect_api_key( key_id: ENV["APP_STORE_CONNECT_API_KEY_ID"], issuer_id: ENV["APP_STORE_CONNECT_API_ISSUER_ID"], key_content: ENV["APP_STORE_CONNECT_API_KEY_CONTENT"] ) - match( + # 1. 인증서 동기화 + match( git_url: ENV["REPOSITORY"], git_branch: ENV["BRANCH"], type: "appstore", readonly: true, api_key: api_key ) + # 2. 앱 빌드 + build_app( + ... + ) + # 3. TestFlight 업로드
🤖 Fix all issues with AI agents
In `@fastlane/Fastfile`:
- Around line 78-86: The current Fastfile uses
upload_to_testflight(skip_waiting_for_build_processing: true) followed
immediately by download_dsyms, which will fetch the previous build's dSYM
because processing hasn't completed; to fix, either (a) use the locally
generated dSYM from build_app instead of calling download_dsyms, (b) set
upload_to_testflight(skip_waiting_for_build_processing: false) so processing
completes before download_dsyms runs, or (c) move download_dsyms into a separate
lane/after-processing job to run after App Store Connect processing finishes;
additionally, ensure download_dsyms includes the App Store Connect credential by
adding api_key: api_key to its call (referencing upload_to_testflight,
download_dsyms, and build_app).
In `@Plugins/EnvPlugin/ProjectDescriptionHelpers/Settings`+Extension.swift:
- Line 46: Replace the unnecessary string interpolation for the PRODUCT_NAME
value by passing the String directly: change the value from
"\"(Project.Environment.appName)\"" to Project.Environment.appName for both
debug and release settings so PRODUCT_NAME uses the existing String without
interpolation; update the assignment where PRODUCT_NAME is set and ensure the
change is applied consistently in Settings+Extension.swift's settings extension.
🧹 Nitpick comments (2)
fastlane/Fastfile (2)
83-86: 앱 식별자 하드코딩 대신 환경 변수 또는 Appfile 활용 권장
app_identifier: "org.yapp.NDGL.App"이 하드코딩되어 있습니다. Appfile이나 환경 변수를 통해 관리하면 유지보수성이 향상됩니다.
52-60: 들여쓰기가 탭과 스페이스 혼용되어 있습니다.
build_app블록 내output_directory(Line 54),scheme(Line 55),output_name(Line 58),xcargs(Line 59) 등의 파라미터가 탭으로 들여쓰기되어 나머지 코드(스페이스)와 일관성이 없습니다. Lines 71, 79도 동일합니다. 통일된 들여쓰기(스페이스 권장)를 적용해 주세요.
| upload_to_testflight( | ||
| api_key: api_key, | ||
| skip_waiting_for_build_processing: true # 업로드 후 프로세싱 완료까지 기다리지 않음 | ||
| ) | ||
|
|
||
| download_dsyms( | ||
| app_identifier: "org.yapp.NDGL.App", | ||
| output_directory: "./Projects/App/Outputs/Archives/PROD" | ||
| ) |
There was a problem hiding this comment.
skip_waiting_for_build_processing: true 설정 시 download_dsyms가 현재 빌드의 dSYM을 받지 못합니다.
upload_to_testflight에서 skip_waiting_for_build_processing: true를 설정하면 빌드 프로세싱 완료를 기다리지 않으므로, 바로 이어서 호출되는 download_dsyms는 아직 프로세싱되지 않은 현재 빌드가 아닌 이전 빌드의 dSYM을 다운로드하게 됩니다.
대안:
build_app이 이미 로컬에 dSYM을 생성하므로 별도 다운로드 없이 로컬 경로를 활용skip_waiting_for_build_processing: false로 변경하여 프로세싱 완료 후 다운로드download_dsyms호출을 별도 레인이나 후속 작업으로 분리
또한, download_dsyms에 api_key 파라미터가 누락되어 App Store Connect 인증에 실패할 수 있습니다.
🤖 Prompt for AI Agents
In `@fastlane/Fastfile` around lines 78 - 86, The current Fastfile uses
upload_to_testflight(skip_waiting_for_build_processing: true) followed
immediately by download_dsyms, which will fetch the previous build's dSYM
because processing hasn't completed; to fix, either (a) use the locally
generated dSYM from build_app instead of calling download_dsyms, (b) set
upload_to_testflight(skip_waiting_for_build_processing: false) so processing
completes before download_dsyms runs, or (c) move download_dsyms into a separate
lane/after-processing job to run after App Store Connect processing finishes;
additionally, ensure download_dsyms includes the App Store Connect credential by
adding api_key: api_key to its call (referencing upload_to_testflight,
download_dsyms, and build_app).
| let debugSettings: [String: SettingValue] = [ | ||
| "APP_DISPLAY_NAME": .string("\(Environment.App.displayName)-Dev"), | ||
| "PRODUCT_NAME": .string("\(Environment.App.displayName)"), | ||
| "PRODUCT_NAME": .string("\(Project.Environment.appName)"), |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Find the Settings+Extension.swift file
fd -type f -name "Settings+Extension.swift"Repository: YAPP-Github/27th-App-Team-1-iOS
Length of output: 245
🏁 Script executed:
# List files in the Plugins/EnvPlugin directory to understand structure
find Plugins/EnvPlugin -type f -name "*.swift" | head -20Repository: YAPP-Github/27th-App-Team-1-iOS
Length of output: 363
🏁 Script executed:
# Search for Project.Environment and Environment definitions
rg -n "Project\.Environment|Environment\.App" --type swift -C 2 | head -50Repository: YAPP-Github/27th-App-Team-1-iOS
Length of output: 3640
🏁 Script executed:
# Read the Settings+Extension.swift file to understand imports and full context
cat -n Plugins/EnvPlugin/ProjectDescriptionHelpers/Settings+Extension.swiftRepository: YAPP-Github/27th-App-Team-1-iOS
Length of output: 4193
🏁 Script executed:
# Read the Environment.swift file to see how Environment is defined
cat -n Plugins/EnvPlugin/ProjectDescriptionHelpers/Environment.swiftRepository: YAPP-Github/27th-App-Team-1-iOS
Length of output: 1030
🏁 Script executed:
# Search for Project.Environment definition in the codebase
rg -n "Project\.Environment|extension Project" --type-list swiftRepository: YAPP-Github/27th-App-Team-1-iOS
Length of output: 464
불필요한 문자열 보간 제거
Project.Environment.appName은 이미 String 타입이므로, 문자열 보간 "\(...)" 없이 직접 전달할 수 있습니다. 파일의 다른 설정들과 일치하도록 다음과 같이 수정하세요.
♻️ 제안된 변경
- "PRODUCT_NAME": .string("\(Project.Environment.appName)"),
+ "PRODUCT_NAME": .string(Project.Environment.appName),(debug와 release 모두 동일하게 적용)
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "PRODUCT_NAME": .string("\(Project.Environment.appName)"), | |
| "PRODUCT_NAME": .string(Project.Environment.appName), |
🤖 Prompt for AI Agents
In `@Plugins/EnvPlugin/ProjectDescriptionHelpers/Settings`+Extension.swift at line
46, Replace the unnecessary string interpolation for the PRODUCT_NAME value by
passing the String directly: change the value from
"\"(Project.Environment.appName)\"" to Project.Environment.appName for both
debug and release settings so PRODUCT_NAME uses the existing String without
interpolation; update the assignment where PRODUCT_NAME is set and ensure the
change is applied consistently in Settings+Extension.swift's settings extension.
🔗 연결된 이슈
📄 작업 내용
Summary by CodeRabbit
릴리스 노트
Chores
Documentation