Study
Flutter iOS Fastlane 설정
zombie45
2021. 5. 8. 00:38
안드로이드랑 버젼을 맞추기 위해 increment_build_number은 삭제했습니다.
http://appleid.apple.com/ 보안>앱암호>앱암호 생성 에서 발급받은 키 설정
.env
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD="xxxx-xxxx-xxxx-xxxx"
패스트래인 설정:
- 빌드 (빌드 어차피 .ipa로 해야되서 flutter build 해도 다시 돌려야됨)
- 앱스토어 업로드
- 완료/에러시 슬랙
Fastfile
default_platform(:ios)
platform :ios do
def on_success()
slack(
message: "App successfully built", #uploaded to iTunesConnect.",
success: true,
slack_url: "https://slack-web-hook",
default_payloads: [:git_branch, :last_git_commit_message],
attachment_properties: {
fields: [
{
title: "Build number",
value: ENV["BUILD_NUMBER"],
},
{
title: "Test URL",
value: "https://my-test-url",
}
]
}
)
end
def on_error(exception)
slack(
message: "Error occured!",
success: false,
slack_url: "https://slack-web-hook",
attachment_properties: {
fields: [
{
title: "Error build failed",
value: exception
}
]
}
)
end
desc "Push a new build to TestFlight"
lane :release do
begin
build_app(workspace: "Runner.xcworkspace", scheme: "Runner")
upload_to_app_store(
force: true, # Skip HTMl report verification
skip_screenshots: true,
skip_metadata: true
)
on_success()
rescue => exception
on_error(exception)
end
end
end
반응형