Black Friday: 50% off lifetime access. Ends in
Wow KeywordsGet lifetime · $119 $59

Blog ·

Fastlane screenshots: automate App Store captures

Use fastlane snapshot to run your iOS app's Xcode UI test on each selected simulator in each selected language and save the PNGs in locale folders such as en-US/ and de-DE/. The test controls which screens you capture, so you can rerun the same sequence after a release changes the interface.

How to take fastlane screenshots with snapshot

Set up the Xcode scheme. Add a UI testing target for your app. From the project folder, run fastlane snapshot init to generate a Snapfile and SnapshotHelper.swift, then add the helper to the UI test target. Create a scheme for that target and mark it Shared in Manage Schemes. Under Edit Scheme → Build, enable Run for the UI test target and check that the scheme's Test action includes it. Fastlane's screenshot setup guide

Write one capture test. In the UI test target, configure Snapshot before launching the app, and remove any extra launch call from Xcode's generated test. This test captures a home screen as soon as its accessibility identifier is present. Replace home-screen with an identifier from your app and add any taps needed to reach that screen before the assertion.

import XCTest

final class StoreScreenshotTests: XCTestCase {
    @MainActor
    func testCaptureHome() {
        let app = XCUIApplication()
        setupSnapshot(app)
        app.launch()

        let home = app.descendants(matching: .any)
            .matching(identifier: "home-screen").firstMatch
        guard home.waitForExistence(timeout: 10) else {
            XCTFail("Home screen did not appear")
            return
        }
        snapshot("01Home")
    }
}

For a second capture, continue navigating in the same test and give the next snapshot(...) call a distinct name. Wait for the content you want visible, such as a loaded results list, before capturing it. A stable accessibility identifier lets the same test find the element in English and German.

Choose your simulators and languages. Edit the Snapfile with the name of your shared scheme and the exact names of two simulators installed in Xcode. Use a dedicated output directory for raw captures. Snapshot action reference

scheme("StoreScreenshotTests")
devices(["iPhone 16", "iPhone 16 Plus"])
languages(["en-US", "de-DE"])
output_directory("./fastlane/raw-screenshots")

Run fastlane snapshot from the project folder. With two devices, two locales and one capture per test, a successful run produces four PNGs across fastlane/raw-screenshots/en-US/ and fastlane/raw-screenshots/de-DE/. Open the generated HTML overview to check that each device and language reached the same screen. Check the image itself for the expected language, any clipped labels and any onboarding prompts that covered the interface.

How to turn raw captures into localized App Store screenshots

Open Screens in Wow Keywords and use the PNGs from Snapshot to build the store images.

  1. In Main listing, import the 01Home PNG for iPhone 16 from en-US/ to create one slide and place the image in a device frame. Leave the iPhone 16 Plus capture out of this slide set to avoid duplicating the home screen.
  2. Add a heading to the slide. In Localizations, translate the heading and replace the app image on the same slide in the German layout with the 01Home PNG for iPhone 16 from de-DE/. The heading sits outside the frame. The localized PNG supplies the German interface inside it.
  3. Render the device sizes your listing needs. Review each language at its rendered size to catch headings that wrap over the device or crowd its frame. Use the App Store screenshot size guide to choose your output sets before export.

For a browser workflow, use the screenshot localizer to edit the layouts and download the localized PNGs as a ZIP.

How to hand finished screenshots to fastlane deliver

In Wow Keywords, open Screens and go to Export → fastlane screenshots folder. Select the device sets you need, choose All ready languages, and confirm English and German are listed. Click Choose folder & export and choose fastlane/finished-screenshots/ in your project. This writes the rendered PNGs into locale folders under the directory you'll pass to Deliver. Keep it separate from the raw captures so you can rerun Snapshot without changing the upload set.

fastlane/finished-screenshots/
  en-US/
    iphone_1.png
  de-DE/
    iphone_1.png

Set screenshots_path("./fastlane/finished-screenshots") in your Deliverfile. Point it at the parent of the locale folders. Deliver reads the language from the folder and detects the device type from the image resolution.

If you've already configured Deliver, run this from the project folder to upload screenshots only.

fastlane deliver --skip_metadata --skip_binary_upload

For authentication and upload steps, follow the fastlane deliver guide. Deliver action reference

FAQ

Why does my UI test pass in Xcode without exporting screenshots?

Xcode runs the UI test, and the Snapshot CLI handles the export. Run fastlane snapshot from the project folder to collect and rename the test captures, write them into the locale folders, and generate the HTML overview. If the command fails on one simulator or language, add --stop_after_first_error to stop at the failing combination. Fastlane's screenshot setup guide

What if fastlane says a simulator is unavailable?

Run xcrun simctl list devices available and compare the names it returns with devices in your Snapfile. If the model you want is missing, install a compatible simulator runtime in Xcode or select an available device from the list.

Why is the app still in English in the German screenshot?

Check that the app ships German translations for the strings on that screen. If it uses its own language picker or remembers a language preference, make the UI test select German before the capture. You can read deviceLanguage from SnapshotHelper.swift to choose the matching language in the test.