Build, run and debug your iOS app

Run the app on a simulator beside your API, and see every call it makes: the endpoint it hit, what it sent and what came back. Android runs the same way.

2 min read

Before you start

  • Xcode or its command line tools, and a simulator.
  • An Xcode, XcodeGen or Tuist project, or a Swift package.

At a glance#

Build

The Xcode panel: Schemes and Targets. Swift packages get a panel of their own.

Run

Each scheme’s app, on a simulator or your Mac.

Debug

Every call it makes in Live wire, read whole and sent again; frames linked to their line.

Build#

An .xcodeproj, XcodeGen’s project.yml or Tuist’s Project.swift gets the Xcode panel, with Schemes and Targets tabs; a Package.swift gets the Swift panel.

Run it beside the API#

  1. Pick the scheme.

    Found in this folder offers each scheme’s app. Its first run asks which simulator, then runs it there.

  2. Start it with the backend.

    Put it in a group with the API and workers, so one click starts the whole product.

  3. Watch it talk.

    Open Live wire. The app is drawn as the Mobile app, and each call it makes travels to the endpoint it hit, with its status. The app goes on calling localhost at the API’s usual port; nothing in it changes.

Debug: read every call#

On a phone, the bug is usually in the conversation: the request the app sent, or the answer it didn’t expect. Open a call from the picture or the Calls list to read its request and response whole, with how long it took. Replay sends the same request again and says what came back.

A call from iOS’s networking stack is guessed as Mobile. Click it and answer Which runner is iOS app? with your runner, and its calls come from the app’s block from then on.

Swift frames in the app’s output link to their line from Superlog, and a walkthrough steps through a function without running it. To see what the API did with the call, debug the backend.

Android#

An Android app is a Gradle build, so it appears in the Gradle panel. Found in this folder offers it as Run on a device: installed and launched on an emulator or a connected device. Live wire draws it as the Mobile app and its calls the same way, and Android stack frames link to their line.

Next steps#

Something unclear or out of date? Tell us; a person on the team reads every note.

Search every guide: features, settings, keys and troubleshooting.

Try