Mastering App Store Submissions with Fastlane Deliver

Furkan Erdem Persembe
5 min readNov 3, 2023

--

The process of publishing mobile applications to the App Store can be a tedious and time-consuming task. However, there’s a tool that can simplify this process, making it faster and more efficient — Fastlane Deliver. In this article, we will delve into how you can streamline and automate the app submission process using Fastlane Deliver.

Step 1: Create Authorization Keys

To interact with the App Store APIs, Fastlane employs a powerful tool called Spaceship, for which you need authorization keys. Here’s how you can generate them:

  1. Go to the App Store Connect platform.
  2. Navigate to “Users and Access” and switch to the “Keys” tab.
  3. Create a new key with “App Manager” access.
  4. This key will appear in your list of keys, with all the necessary information visible.
  5. Copy and securely store the “Issuer ID,” “Key ID,” and download the key as a “.p8” file.

Step 2. Add authorization step

In your Fastfile, add the following lines using the app_store_connect_api_key action from Fastlane:

app_store_connect_api_key(key_id: "KEY_ID",
issuer_id: "ISSUER_ID",
key_filepath: "PATH_TO_P8_KEY_FILE")

Step 3. Create the Binary

Creating a binary file can be handled in various ways. If you’re using Gym, Fastlane Deliver can automatically read the IPA path from the SharedValues::IPA_OUTPUT_PATH variable.

Here’s an example:

gym(export_method: "app-store",
project: "",
# workspace: "",
scheme: "",
configuration: "")

Step 4: The Deliver Action

Fastlane Deliver offers a multitude of features, nearly supporting everything you can manually handle on the App Store Connect website. With a single command, you can perform the following tasks:

  • Upload the binary as an “.ipa” file.
  • Update screenshots.
  • Update metadata.
  • Add an attachment file for the app review team.
  • Update review information.
  • Run a pre-check to validate metadata.
  • Submit the app for review.

All of this can be completed in a matter of minutes, saving you valuable time and effort.

deliver(
# General Parameters
force: true, # Skip HTTP Verification
username: "APP_STORE_USERNAME", # Email Address
app_identifier: "APP_IDENTIFIER", # Bundle identifier
itc_provider: "APP_STORE_ITC_PROVIDER", # Team ID
# Binary Upload
ipa: "IPA_PATH",
# Upload Type
skip_binary_upload: false,
skip_screenshots: false,
skip_metadata: false,
# Metadata Properties
metadata_path: "METADATA_PATH",
app_review_attachment_file: "ATTACHMENT_FILE",
# Screenshot Properties
screenshots_path: "SCREENSHOTS_PATH",
overwrite_screenshots: true,
sync_screenshots: true,
# Submission Properties
submit_for_review: true,
automatic_release: true,
phased_release: true,
submission_information: { add_id_info_uses_idfa: false })

Let’s divide this huge function into parameters and inspect every section one by one in detail.

Deliverfile

Fastlane also provides reserved filenames, which help you maintain order by keeping constants and variables tidy. The “Deliverfile” is specially reserved for the “deliver” action, making your Fastfile more readable.

username: "APP_STORE_USERNAME" # Email Address
app_identifier: "APP_IDENTIFIER" # Bundle identifier
itc_provider: "APP_STORE_ITC_PROVIDER", # Team ID

General Parameters

Running the deliver action locally often involves a preliminary HTML Preview before uploading and submitting your application for review. As this requires user interaction, it’s important to account for it. Fastlane Deliver offers the force parameter to make the decision of skipping or utilizing user interaction.

# When set to true Http verification is by-passed. 
# For local usage set to false to check and verify updates
# In CI, set to true to by-pass user interaction
force: true

Upload Binary

To upload the binary, you only need to provide the path to the “.ipa” file. If you use Gym to package the binary, Fastlane Deliver automatically reads the SharedValues::IPA_OUTPUT_PATH as default value, and ipa parameter becomes optional.

# Path of the ipa archive
ipa: "IPA_PATH"

# Defaults to false, set true to skip binary upload.
skip_binary_upload: false

Upload Metadata

Deliver expects metadata in a specific format, stored in multiple “.txt” files within a folder hierarchy. Fastlane has you covered with the download_metadata action, which converts all fields into the format that Deliver expects.

You can run this action in your terminal, but it may require API Key parameters based on your local setup.

fastlane deliver download_metadata

Here are the parameters for Metadata Upload action, metedata_path should be the path of the folder that keeps data in certain format. And optionally if you are using an attachment file to share some information or videos with review team, you can add path of the attachment file as app_review_attachment_file.

# Metadata Path
metadata_path: ""

# Attachment File Path
app_review_attachment_file: ""

# Defaults to false, set true to skip metadata upload.
skip_metadata: false

Upload Screenshots

Deliver also has specific requirements for screenshots, including certain image file names in a folder hierarchy. Fastlane thought ahead and provides the download_screenshots action to prepare your screenshots in the required format.

You can execute this action in your terminal, and it may require API Key parameters based on your local setup.

fastlane deliver download_screenshots

Here are the parameters for Screenshot Upload action, screenshots_path should be the path of the folder that keeps images in certain format.

sync_screenshots is a beta feature now, checks the hashes of image files and uploads only the updated images. Drops upload time significantly. If you want to use this option, you must set a value to FASTLANE_ENABLE_BETA_DELIVER_SYNC_SCREENSHOTS environment variable.

overwrite_screenshots cleans up all screenshots and uploads new ones. When used with sync_screenshots: true , this parameter is not active.

# Screenshots Path
screenshots_path: ""

# Clean all Screenshots before uploading. Defaults to false.
overwrite_screenshots: true

# Checks image hashes before uploading and only upload the updated screenshots.
# Defaults to false.
sync_screenshots: true

# Defaults to false, set true to skip screenshot upload.
skip_screenshots: false

Submit to Review

Fastlane Deliver offers an option to either manually or automatically push the Submit for Review button. If you set submit_for_review to true, you won’t need to open the App Store Connect website, as everything is handled automatically.

Fastlane Deliver provides representations for every option available on the App Store Connect platform, so refer to the documentation for further customization.

# Defaults to false, set true to use automatic release option.
automatic_release: true

# Defaults to false, set true to use phased release option.
phased_release: true

# Defaults to false, set true to submit for review.
submit_for_review: true

Pre-Check

Before moving forward to the submission step, Deliver runs a pre-check on all the data and screenshots. However, if your action is divided into multiple steps, waiting for Fastlane to finish the pre-check can be inconvenient. To overcome this, you can easily disable the pre-check step with the following parameters:


# Runs pre-check when set to true.
run_precheck_before_submit: false

# Disable In App Purchase pre-check. Defaults to true.
# Set false if app don't have in-app purchase, otherwise action fails.
precheck_include_in_app_purchases: false

Final words

In summary, Fastlane Deliver simplifies and automates the entire App Store submission process, enabling you to save time and ensure a smooth publishing experience. With its various parameters and features, you can tailor the process to your specific needs and preferences, whether you prefer full automation or more manual control. Fastlane Deliver is a powerful ally for developers seeking a more efficient path to the App Store.

Thank you for Reading…

--

--