LogoLogo
🚀 Run Maestro tests in the cloud →
  • Home
  • Star us on GitHub
  • Getting Started
    • What is Maestro?
    • Installing Maestro
      • macOS
      • Windows
      • Linux
    • Build and Install your App
      • Android
      • iOS
    • Run a Sample Flow
    • Writing Your First Flow
    • Maestro Studio
    • Running Flows on CI
  • Cloud
    • Run Maestro tests in the cloud
    • Cloud Quickstart
    • CI Integration
      • GitHub Actions
        • Maestro GitHub Action for Android
        • Maestro GitHub Action for iOS
        • Maestro GitHub Action for Flutter
      • Bitrise
      • Bitbucket Pipelines
      • CircleCI
      • Integration with any CI platform
    • Pull Request Integration
    • Cloud Reference
      • Build your app for the cloud
      • Configuring OS Version
      • Configuring device locale
      • Device timezones
      • Email Notifications
      • Slack Notifications
      • Webhook Integration
      • Managing Secrets
      • Limits
      • Reusing App Binary
      • IP Allowlist
      • System Status
  • Platform Support
    • Supported Platforms
    • Android - Views
    • Android - Jetpack Compose
    • iOS - UIKit
    • iOS - SwiftUI
    • React Native
    • Flutter
    • Web Views
    • Web (Desktop Browser)
  • Examples
    • Android contacts flow automation
    • Facebook signup flow automation
    • Advanced: Wikipedia Android
    • Page Object Model
  • CLI
    • Cloud
    • Test Suites & Reports
    • Tags
    • Record Your Flow
    • Continuous Mode
    • View Hierarchy
    • Start Device
  • API Reference
    • Commands
      • addMedia
      • assertVisible
      • assertNotVisible
      • assertTrue
      • assertWithAI
      • assertNoDefectsWithAi
      • back
      • clearKeychain
      • clearState
      • copyTextFrom
      • evalScript
      • eraseText
      • extendedWaitUntil
      • extractTextWithAI
      • hideKeyboard
      • inputText
      • killApp
      • launchApp
      • openLink
      • pressKey
      • pasteText
      • repeat
      • retry
      • runFlow
      • runScript
      • scroll
      • scrollUntilVisible
      • setAirplaneMode
      • setLocation
      • startRecording
      • stopApp
      • stopRecording
      • swipe
      • takeScreenshot
      • toggleAirplaneMode
      • tapOn
      • doubleTapOn
      • longPressOn
      • travel
      • waitForAnimationToEnd
    • Common command arguments
    • Selectors
    • Configuration
      • Workspace configuration
      • Flow configuration
      • AI configuration
  • Advanced
    • Nested Flows
    • Wait
    • Loops
    • Conditions
    • Parameters & Constants
    • JavaScript
      • Run JavaScript
      • Outputs
      • Logging
      • Access element text
      • Make HTTP requests
      • GraalJS support
      • JavaScript announcement blog
    • Specify a Device
    • Configure Permissions
    • Detect Maestro in your app
    • Configure Maestro driver timeout
    • onFlowStart / onFlowComplete hooks
    • Test in different locales
    • Structuring your test suite
  • Troubleshooting
    • Known Issues
    • Frequently Asked Questions
    • Bug Report
    • Rollback Maestro
    • Debug Output
    • HOWTOs
      • Arrange your repository for Maestro tests
      • scrollUntilVisible for fragments
  • Community
    • Contributions
    • Articles & Tutorials
    • Case Studies
    • Resources
Powered by GitBook

Read to wire into CI or scale up your testing?

  • Run Maestro tests in the cloud →
On this page
  • Building with Xcode
  • Default build location
  • Building with Xcode command line tools
  • Building with Fastlane
  • Building with Flutter
  • Running on a Simulator

Was this helpful?

Edit on GitHub
  1. Getting Started
  2. Build and Install your App

iOS

PreviousAndroidNextRun a Sample Flow

Last updated 1 month ago

Was this helpful?

This all assumes you've got Xcode plus Simulator runtimes installed. If you haven't, and want to know how, we've made a video walkthrough:

Building with Xcode

Maestro currently supports iOS Simulator builds (.app), AppStore distribution device builds (.ipa) are not currently supported. The easiest way to get an app installed on the simulator is by building and running it from Xcode (make sure that simulator target is selected):

Default build location

If you want to install the .app manually, the file can be found under the Products folder at Xcode Menu: Product -> Show Build Folder in Finder -> Then go to path Products/Debug-iphonesimulator

The .app file can then be installed on the simulator by simple dragging and dropping the file or via Xcode command line tools by running:

xcrun simctl install $DEVICE_UDID /path/to/your/app

Building with Xcode command line tools

xcrun xcodebuild -scheme 'Food Truck' \
-project 'Food Truck.xcodeproj' \
-configuration Debug \
-sdk 'iphonesimulator' \
-destination 'generic/platform=iOS Simulator' \
-derivedDataPath \
build

The .app file can be then found under /build folder

Building with Fastlane

xcodebuild(
      configuration: build_config[:configuration],
      scheme: build_config[:scheme],
      workspace: build_config[:xcode_workspace],
      xcargs: "-quiet -sdk 'iphonesimulator' -destination 'generic/platform=iOS Simulator'",
      derivedDataPath: IOS_DERIVED_DATA_PATH # this will contain the .app which we need later on
)

Building with Flutter

If you use Flutter to build your app you can create a debug build for simulators using the following command:

flutter build ios --debug --simulator

You can then find your app file in the build/ios/iphonesimulator/ directory.

Running on a Simulator

Once you've got your .app file, installing it should be as simple as dragging and dropping it onto the running Simulator.

To build an app with Xcode command line tools xcrun xcodebuild should be used. Here is an example on how to build app for iOS simulator target:

If you use for your automation pipelines the script should look the following way:

Food Truck
fastlane