fastlane iOS official translation of four (generation of test package)

Use fastlane packaged iOS beta version

Package your app

fastlane use the name build_appof the action to package your app, add the following code to your Fastfile:

lane :beta do
  build_app(scheme: "MyApp")
end

You can add more parameters to build your app, for example

lane :beta do
  build_app(scheme: "MyApp",
            workspace: "Example.xcworkspace",
            include_bitcode: true)
end

You can use the following code to perform

fastlane beta

If successful, you can find a current directory [产品名称].ipa. For more parameters can be performed fastlane action build_app.

signature

If you're in the previous step because the signature and cause failure, we have prepared a signature wizard to help you set up your signature applications.

Upload your app

After you build complete your app. It will upload your test version .fastlane according to your choice strengths is that it can easily replace the test provider, or upload to multiple rather than more work.

You have to do is put the name of the test providers listed in your build_applane in:

lane :beta do
  sync_code_signing(type: "appstore")    # see code signing guide for more information
  build_app(scheme: "MyApp")
  upload_to_testflight
  slack(message: "Successfully distributed a new beta build")
end

fastlane will automatically relevant information from .ipa build_appsent in to test the provider of your choice.

You can get all the available parameters:

fastlane action slack

Beta testing provider

  • TestFlight
    you can use fastlane easily upload test kits to testflight. Simply add testflightthe complete packaged in action
lane :beta do
  # ...
  build_app
  upload_to_testflight
end

Some examples

lane :beta do
  # ...
  build_app

  # Variant 1: Provide a changelog to your build
  upload_to_testflight(changelog: "Add rocket emoji")

  # Variant 2: Skip the "Waiting for processing" of the binary
  #   While this will speed up your build, it will not distribute
  #   the binary to your tests, nor set a changelog
  upload_to_testflight(skip_waiting_for_build_processing: true)
end

If you use fastlane init set fastlane, your appID stored in fastlane / Appfile in. You can also override the user name upload_to_testflight(username: "[email protected]").

You can obtain the available parameters

fastlane action upload_to_testflight

You can also use fastlane automatically manage your testers.

  • Crashlytics
lane :beta do
  # ...
  build_app
  crashlytics(api_token: "[insert_key_here]",
              build_secret: "[insert_key_here]")
end

You can organize settings page get your API key and secret links.

Get more available parameters

fastlane action crashlytics
  • HockeyApp
lane :beta do
  # ...
  build_app
  hockey(api_token: "[insert_key_here]")
end

Can account settings API Tokens get your API token.

Published mark

  • Automatically generates git commits

You can change the log, so that you do not need a lot of statements stored in Fastfile in.

lane :beta do
  sync_code_signing
  build_app

  changelog_from_git_commits # this will generate the changelog based on your last commits
  upload_to_testflight
end

More examples:

changelog_from_git_commits(
  between: ['7b092b3', 'HEAD'], # Optional, lets you specify a revision/tag range between which to collect commit info
  merge_commit_filtering: exclude_merges # Optional, lets you filter out merge commits
)
  • According to the log generation
    You can also automatically generate labeled according to the log
lane :beta do
  # Variant 1: Ask for a one line input
  changelog = prompt(text: "Changelog: ")

  # Variant 2: Ask for a multi-line input
  #   The user confirms their input by typing `END` and Enter
  changelog = prompt(
    text: "Changelog: ",
    multi_line_end_keyword: "END"
  )

  sync_code_signing
  build_app

  upload_to_testflight(changelog: changelog)
end

[ Https://www.jianshu.com/p/2a029dda5337](fastlane iOS official translation of five (officially generation package))

Reproduced in: https: //www.jianshu.com/p/17aa39baf2bf

Guess you like

Origin blog.csdn.net/weixin_33712987/article/details/91154987