DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
Android

How to Automate App Screenshots with Fastlane (iOS and Android)

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Fastlane automates repeatable app screenshot runs by driving iOS Xcode UI Tests with snapshot and Android instrumented Espresso tests with Screengrab. For iOS, create a UI Test target, add Fastlane’s generated helper, mark the screens in your test, check device and language settings into a Snapfile, and run fastlane snapshot from the command line. Fastlane then organizes the images and writes an HTML review page. Android uses a separate Screengrab setup; SnapshotHelper and Snapfile instructions do not apply there.

Choose the workflow for your platform

Platform Fastlane action Test technology What you configure
iOS snapshot Xcode UI Tests and simulators Shared test scheme, SnapshotHelper.swift, devices, languages, launch arguments and output in a Snapfile
Android Screengrab Instrumented tests with Espresso Android test project, Screengrab configuration and Google Play upload tooling

The two paths solve the same publishing problem but are not interchangeable. This guide starts with the complete iOS workflow because that is where Fastlane’s snapshot action and helper are used, then explains the Android counterpart.

Automate iOS screenshots with Snapshot

Prerequisites and project preparation

  • A Mac capable of running your installed Xcode and iOS simulators is relevant to this Xcode-based workflow; Fastlane’s documentation does not establish a particular Mac model.
  • An iOS project that builds and launches in a simulator.
  • A UI Test target in the Xcode project.
  • A scheme that includes and can run that UI Test target.
  • Fastlane installed in the project’s normal way (for example, through the project’s existing Ruby or Bundler setup).

Keep the Xcode, Fastlane and simulator versions used by your team consistent. The documentation cited here does not define a current minimum-version matrix, so verify compatibility against the versions you install.

1. Create the UI Test target

  1. Open the project in Xcode.
  2. Use File > New > Target…, choose an iOS UI Testing target, and add it to the application.
  3. Give the target a stable name, select the app under test, and let Xcode create the test class.

Your screenshot test should perform the same navigation a reviewer would perform: launch, dismiss onboarding when appropriate, wait for the relevant content, and then mark a screen.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Apple iPhone 14, 128GB, Midnight - Unlocked (Renewed)
  • This phone is unlocked and compatible with any carrier of choice on GSM and CDMA networks (e.g. AT&T, T-Mobile, Sprint, Verizon, US Cellular, Cricket, Metro, Tracfone, Mint Mobile, etc.).
  • Please check with your carrier to verify compatibility.
  • The device does not come with headphones or a SIM card. It does include a generic (Mfi certified) charging cable.
  • Tested for battery health and guaranteed to have a minimum battery capacity of 80%.

2. Generate and install SnapshotHelper.swift

From the project directory, initialize Snapshot:

fastlane snapshot init

Fastlane generates SnapshotHelper.swift and a starter configuration. Add the generated Swift file to the UI Test target in Xcode’s target-membership inspector. If the helper is only present in another target, the test will compile without the setupSnapshot and snapshot functions you need—or fail to link them.

3. Share the scheme and enable the test action

  1. In Xcode, choose Product > Scheme > Manage Schemes….
  2. Select the scheme used for screenshot tests and enable Shared.
  3. Edit the scheme, open the Run action, and ensure the UI Test target is enabled in the test configuration.
  4. Commit the shared scheme files so another machine and CI can select the same scheme.

Running a test directly with Xcode is useful for debugging, but it does not create the same organized Snapshot output and HTML summary as the command-line action.

4. Set up the test and mark each screen

Import the generated helper into the UI test and call setupSnapshot(app) before launching. Call snapshot("screen-name") after the app reaches each stable state. Fastlane’s concise instruction is to call the screenshot function “between interactions.”

import XCTest

final class ScreenshotTests: XCTestCase {
    let app = XCUIApplication()

    override func setUpWithError() throws {
        continueAfterFailure = false
        setupSnapshot(app)
        app.launch()
    }

    func testScreens() throws {
        snapshot("home")

        app.buttons["Get started"].tap()
        snapshot("onboarding")

        app.buttons["Settings"].tap()
        snapshot("settings")
    }
}

Use deterministic accessibility identifiers or labels rather than coordinates. Reset account state, feature flags and test data in setup so a second run reaches the same screens. Wait for an element that proves the page is ready before taking its image; otherwise a valid test can still capture a loading state.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Make runs reproducible with a Snapfile

A Snapfile keeps the matrix and output policy in version control. The exact option names depend on the Fastlane release, so retain the file generated by snapshot init and edit its documented keys rather than copying an outdated example wholesale. Configure the following categories:

Rank #2
Apple iPhone 16, 128GB, Pink - Unlocked (Renewed)
  • 6.1" Super Retina XDR OLED, HDR10, Dolby Vision, 1000nits (typ), 2000nits (HBM), 2556x1179px at 460ppi, 3561mAh Battery
  • 128GB 8GB RAM, Apple A18 (3nm), Hexa-core (2x4.04 GHz + 4x2.20 GHz), Apple GPU 5-core, 16‑core Neural Engine
  • Rear camera: 48MP, f/1.6, wide + 12MP, f/2.2, ultrawide, Front Camera: 12MP, f/1.9, wide, iOS 18, upgradable to iOS 18.5
  • 4G LTE: 1/2/3/4/5/7/8/12/13/14/17/18/19/20/25/26/28/29/30/32/34/38/39/40/41/42/48/53/66/71, 5G: n1/2/3/5/7/8/12/14/20/25/26/28/29/30/38/40/41/48/53/66/70/71/75/76/77/78/79 - Dual eSIM
  • Unlocked for freedom to choose your carrier. Compatible with both GSM & CDMA networks. The phone is unlocked to work with all GSM Carriers & CDMA Carriers Including AT&T, T-Mobile, Verizon, Sprint., Etc.
  • Scheme: the shared scheme containing the UI Test target.
  • Devices: the simulator models that represent your supported store screenshots.
  • Languages: locale codes for each localized run.
  • Launch arguments: arguments that select deterministic accounts, feature flags or test content.
  • Output: destination directory and whether old images should be cleared.
  • Status bar: overrides when you need consistent time, battery or network indicators.
  • Execution: concurrent simulator operation and whether to stop after the first error.

Multiple launch-argument sets can represent different product configurations. Keep names and paths stable so reviewers and upload lanes can find the expected files.

Run the matrix

fastlane snapshot

Run this command from the project directory (or from the directory containing your Fastlane setup). Snapshot boots the selected simulators, runs the UI test for each device and language, and writes organized image directories plus an HTML overview. The HTML page is useful for QA, marketing and localization review because it exposes missing or inconsistent variants in one place.

Fastlane can continue after an individual device or language fails. Therefore, a successful process exit is not proof that every requested combination exists: inspect the summary and output directories. Set the documented stop_after_first_error behavior when you prefer an early failure over a partial matrix, but still review the generated files.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Review, frame and upload the files

Review before publishing

  • Open the generated HTML summary and check every requested device-language pair.
  • Look for missing directories, fallback-language text, loading indicators, clipped dynamic type and unexpected test data.
  • Open the actual PNG files as well; the summary is an index, not a substitute for checking pixels.

Optional device framing with Frameit

Frameit can add a device frame, background, padding and text. Framing is a presentation step, not a requirement for raw Snapshot output. Fastlane warns that framed images without the App Store-oriented title and background configuration may have dimensions App Store Connect will reject. Validate the final framed dimensions and aspect ratios against the current Apple requirements before uploading.

Upload with a deliberate lane

Fastlane’s iOS documentation shows deliver and the upload_to_app_store lane action as upload paths. A lane can run capture and upload together, but keep review in between when a screenshot change could alter store metadata. Confirm the upload summary and the selected app, platform, locale and version before accepting changes in App Store Connect.

Rank #3
Apple iPhone 15, 128GB, Black - Unlocked (Renewed)
  • 6.1inch Super Retina XDR display. Aluminum with color-infused glass back. Ring/Silent switch
  • Dynamic Island. A magical way to interact with iPhone. A16 Bionic chip with 5-core GPU
  • Advanced dual-camera system. 48MP Main | Ultra Wide. Super-high-resolution photos (24MP and 48MP). Next-generation portraits with Focus and Depth Control. 4X optical zoom range
  • Emergency SOS via satellite. Crash Detection. Roadside Assistance via satellite
  • Up to 26 hours video playback. USB C, Supports USB 2. Face ID
lane :screenshots do
  snapshot
  # Review the generated HTML and files here in CI or as a manual gate.
  deliver
end

The lane above illustrates sequencing; adapt authentication and metadata settings to your project. Do not treat a combined lane as approval to publish unreviewed images.

Android: use Screengrab instead

Fastlane documents Android screenshots through Screengrab. Screengrab runs instrumented tests and uses Espresso interactions, then pairs with Fastlane’s Google Play upload tooling. Create and configure the Android test workflow according to Screengrab’s documentation, place screenshot calls at stable UI states, and run the Android action separately from iOS.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Do not add iOS’s SnapshotHelper.swift to an Android project.
  • Do not copy an iOS Snapfile and assume its device or language settings control Screengrab.
  • Review the Android output and Google Play listing mapping before uploading, just as you review iOS output.

The useful comparison is platform-specific: Snapshot gives iOS UI-Test coverage, while Screengrab gives Android instrumented-test coverage. A cross-platform repository can share naming conventions and test data, but the capture configuration and runners remain separate.

Troubleshooting incomplete or incorrect captures

The helper functions are undefined

Cause: SnapshotHelper.swift is not a member of the UI Test target, or the wrong test target is running. Fix: select the Swift file in Xcode, enable the UI Test target under Target Membership, clean the build folder, and verify the scheme’s test action.

Fastlane cannot find the scheme

Cause: the scheme is not shared, has a different name, or is outside the checkout used by CI. Fix: share it in Manage Schemes, commit the .xcscheme file, and make the Snapfile’s scheme value match exactly.

Rank #4
Apple iPhone 13, 128GB, Midnight - Unlocked (Renewed)
  • This pre-owned product is not Apple certified, but has been professionally inspected, tested and cleaned by Amazon-qualified suppliers.
  • There will be no visible cosmetic imperfections when held at an arm’s length.
  • This product is eligible for a replacement or refund within 90 days of receipt if you are not satisfied.
  • Product may come in generic Box.

A device or locale is missing after a green run

Cause: Snapshot can continue after an individual failure. Fix: read the command summary and inspect every output directory; correct the simulator, localization or test failure, then rerun. Use the documented stop-after-first-error setting when partial output is dangerous.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The image shows a spinner or the wrong screen

Cause: the test marks the screenshot before the UI is ready, or state from a previous run changes navigation. Fix: wait for a specific accessibility element, reset test data, disable nondeterministic animations where appropriate, and call snapshot only after the expected state is visible.

Framed files are rejected by the store

Cause: Frameit output dimensions or configuration do not meet App Store Connect’s current rules. Fix: validate the final files—not the unframed originals—against Apple’s current requirements and remove or reconfigure the frame if necessary.

CI behaves differently from a developer Mac

Cause: different simulator runtimes, Xcode versions, locale data, credentials or test fixtures. Fix: pin the project’s toolchain policy, check in the shared scheme and Snapfile, install the same simulator runtimes, and make launch arguments and test data explicit.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Performance, reliability and operating cost

  • Matrix size: every device-language combination multiplies simulator work. Start with the store-required matrix, then add broader regression coverage only when it provides value.
  • Concurrency: concurrent simulator runs can reduce elapsed time but increase CPU, memory and boot contention. Use the setting supported by your CI host and watch for timeouts.
  • Repeatability: checked-in configuration, deterministic launch arguments and stable accessibility identifiers matter more than simply rerunning the command.
  • Failure accounting: treat the HTML summary and directory inventory as release artifacts. Missing screenshots are a coverage failure even when the command completed.
  • Upload safety: separate capture, human review and store mutation when screenshots affect public metadata.

Or skip the browser setup

Fastlane is the right tool for simulator-driven native app screens. For a website, landing page or documentation image that accompanies the app, ScreenshotNeo provides a single HTTP capture instead of maintaining browser automation. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups and chat widgets; each step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and response headers identify the page verdict and billing result. Its MCP server exposes take_screenshot, get_page_info and capture_pdf to Claude, Cursor and other MCP clients.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For the complete parameter list, see the ScreenshotNeo documentation. This call captures a web URL as WebP:

Best Value
Apple iPhone 16e, 128GB, Black - Unlocked (Renewed)
  • 6.1" Super Retina XDR OLED, HDR10, 800 nits (HBM), 1200 nits (peak), 2532x1170px at 460ppi, 4005mAh Battery
  • 8GB RAM, Apple A18 6-core CPU (2 performance + 4 efficiency cores), Apple GPU 4-core, 16‑core Neural Engine
  • Rear camera: 48MP, f/1.6, wide, Front Camera: 12MP, f/1.9, wide, iOS 18.3.1, upgradable to iOS 18.5
  • Connectivity: Global 4G LTE, Sub-6 GHz 5G, LTE, Wi-Fi 6, Bluetooth 5.3, NFC, USB-C, Wireless Charging (7.5W). (does not have mmWave 5G or MagSafe or physical SIM card) - Dual eSIM Only
  • Unlocked for freedom to choose your carrier. Compatible with both GSM & CDMA networks. The phone is unlocked to work with all GSM Carriers & CDMA Carriers Including AT&T, T-Mobile, Verizon, Straight Talk., Etc.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

ScreenshotNeo includes full-page and element capture, device and retina settings, custom CSS and JavaScript, waits, blocking rules, headers and cookies, PDF options, resizing, caching, signed links, asynchronous webhooks, bulk capture and a usage API. Every feature is on every plan. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account to try it.

FAQ

Does running the UI test in Xcode create the same files as Snapshot?

No. Debugging in Xcode runs the test, but the organized screenshot directories and HTML overview are produced by invoking fastlane snapshot from the command line.

Can one Snapfile control Android Screengrab?

No. Screengrab is a distinct Android workflow with instrumented tests and Espresso. Configure it independently from iOS Snapshot.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Should every screenshot be framed?

No. Frames are optional. If you use Frameit, validate the resulting dimensions and store acceptance before upload.

Frequently Asked Questions

Does running the UI test in Xcode create the same files as Snapshot?

No. The organized screenshot directories and HTML overview come from running fastlane snapshot from the command line.

Can one Snapfile control Android Screengrab?

No. Screengrab is a separate Android workflow using instrumented tests and Espresso.

Should every screenshot be framed?

No. Frames are optional; validate Frameit’s final dimensions before upload.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Quick Recap

Bestseller No. 1
Apple iPhone 14, 128GB, Midnight - Unlocked (Renewed)
Apple iPhone 14, 128GB, Midnight - Unlocked (Renewed)
Please check with your carrier to verify compatibility.; Tested for battery health and guaranteed to have a minimum battery capacity of 80%.
$308.00
Bestseller No. 3
Apple iPhone 15, 128GB, Black - Unlocked (Renewed)
Apple iPhone 15, 128GB, Black - Unlocked (Renewed)
Dynamic Island. A magical way to interact with iPhone. A16 Bionic chip with 5-core GPU; Emergency SOS via satellite. Crash Detection. Roadside Assistance via satellite
$410.00
Bestseller No. 4
Apple iPhone 13, 128GB, Midnight - Unlocked (Renewed)
Apple iPhone 13, 128GB, Midnight - Unlocked (Renewed)
There will be no visible cosmetic imperfections when held at an arm’s length.; Product may come in generic Box.
$262.00

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.