Instantly share code, notes, and snippets.

Embed
What would you like to do?
iOS Fastfile Example for Flutter application Fastlane integration
fastlane_version "2.84.0"
xcversion(version: "9.2")
default_platform :ios
lane :certificates do
match(
app_identifier: ["com.jimdo.boost"],
type: "appstore",
readonly: true)
match(
app_identifier: ["com.jimdo.boost.debug"],
type: "development",
readonly: true)
match(
app_identifier: ["com.jimdo.boost.beta"],
type: "adhoc",
readonly: true)
end
lane :beta do
desc 'Push a new release to Fabric Beta'
setup_travis
match(
type: "adhoc",
app_identifier: "com.jimdo.boost.beta")
increment_build_number(build_number: ENV['TRAVIS_BUILD_NUMBER'])
# build iOS app
gym(
scheme: "Beta",
configuration: "Release-Beta",
export_method: "ad-hoc"
)
# upload to Beta by Crashlytics
crashlytics(
api_token: "CRASHLYTICS_API_TOKEN",
build_secret: "CRASHLYTICS_BUILD_SECRET",
notes_path: 'beta-change.log',
notifications: true,
groups: ['QA'],
)
slack(
message: 'Successfully distributed a new iOS Beta build!',
slack_url: 'SLACK_URL'
)
end
lane :release do
desc 'Push a new release to App Store'
keychain_name = "jimdo.boost.keychain_name"
create_keychain(
name: keychain_name,
password: ENV["MATCH_PASSWORD"],
default_keychain: true,
unlock: true,
timeout: 3600,
add_to_search_list: true
)
match(
keychain_name: keychain_name,
keychain_password: ENV["MATCH_PASSWORD"],
type: "appstore",
app_identifier: "com.jimdo.boost")
increment_build_number(build_number: ENV['TRAVIS_BUILD_NUMBER'])
# build iOS app
gym(
scheme: "Runner",
configuration: "Release",
export_method: "app-store"
)
# upload to App Store
deliver(
app_identifier: "com.jimdo.boost",
skip_screenshots: true,
skip_metadata: true,
automatic_release: false,
team_id: "APP_STORE_TEAM_ID"
)
# upload to Crashlytics
crashlytics(
api_token: "CRASHLYTICS_API_TOKEN",
build_secret: "CRASHLYTICS_BUILD_SECRET"
)
slack(
message: 'New iOS Release build successfully uploaded to App Store',
slack_url: 'SLACK_URL'
)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment