← Blog

Build an iOS app from GitHub Codespaces

Use a browser-based Linux codespace for the repository and coding agent, then hand Xcode compilation, signing, and TestFlight delivery to a cloud Mac.

· 8 min read

Need a Mac for this? NoMac gives your agent full macOS with Xcode for $0.80 an hour, billed per minute. Start now →


GitHub Codespaces can be the development workspace for an iOS app, even from a Windows computer, Chromebook, or tablet. The repository, editor, terminal, and coding agent run in a cloud Linux container. Xcode does not run in that container, so the native iOS build and signing must run on a separate cloud Mac.

The practical route is Codespaces for source work, a NoMac cloud Mac for Xcode and App Store delivery, and TestFlight for testing on a real iPhone.

Codespaces is a browser-accessible Linux development environment, not a hosted Mac. It removes local setup and hardware requirements, but it does not include Apple's SDK or the iOS Simulator.

What runs where

PartLocationResponsibility
VS Code web clientYour browserEditing, terminal, source review
CodespaceGitHub-hosted Linux VM and containerRepository, tools, tests, coding agent
NoMacmacOS VM with Xcode, billed by the minuteXcode builds, Simulator, signing, TestFlight
iPhoneTestFlightReal-device behavior and feedback

GitHub says a codespace is a cloud-hosted development environment and can be used in a browser or desktop VS Code. Its Codespaces features guide explicitly supports working from a browser or tablet. That makes it a good match for a persistent coding agent and a separate cloud Mac.

What the repository must contain

A clean codespace starts from Git. Anything available only on an old developer machine does not exist there. Commit every reproducible input:

  • ·The complete Xcode project or workspace and a shared application scheme.
  • ·Swift, Objective-C, JavaScript, Dart, and native project source as applicable.
  • ·Assets, configuration templates, entitlements, and privacy manifest.
  • ·Package and framework lockfiles.
  • ·Scripts required by the build, using repository-relative paths.

Keep credentials, generated output, local databases, build folders, and dependency caches out of Git. The cloud Mac should reproduce them from declared inputs. Its package and build caches stay on the account's drive between sessions, so only the first build is cold.

Create a reproducible codespace

GitHub Codespaces reads .devcontainer/devcontainer.json to create a development container. GitHub's dev container introduction explains how the file defines tools, runtimes, extensions, and setup commands.

A small Node-enabled starting point looks like this:

{
  "name": "iOS source workspace",
  "image": "mcr.microsoft.com/devcontainers/base:ubuntu",
  "features": {
    "ghcr.io/devcontainers/features/node:1": {}
  }
}

Add only tools the project actually uses. For portable Swift packages, install the current Linux Swift toolchain and official Swift extension. For React Native, pin Node and the package manager. For Flutter, pin the Flutter SDK and commit pubspec.lock. Codespaces should reproduce source work; Xcode remains outside the container.

Connect NoMac securely

For a short-lived personal codespace, you can use the device flow:

npx @nomac/cli login

A deleted codespace loses its local configuration. For a repeatable setup, create a scoped NoMac API key in the dashboard and store it as a Codespaces secret named NOMAC_API_KEY. GitHub's Codespaces secrets guide explains how to restrict a personal development secret to selected repositories. Never write the value into devcontainer.json.

The NoMac CLI reads NOMAC_API_KEY from the environment. Restart the codespace after adding a new secret so GitHub injects it.

Connect the coding agent

Install the agent inside the codespace and register the NoMac stdio server. For example:

# Claude Code
claude mcp add nomac -- npx @nomac/cli mcp

# OpenAI Codex
codex mcp add nomac -- npx @nomac/cli mcp

The agent can then start a Mac and run nomac sync . from the codespace terminal, which sends the exact current source to ~/drive/src on the Mac. Sync needs OpenSSH and rsync in the container. Add an instruction file telling the agent which local checks to run and that the iOS target must be built on the Mac.

The browser-to-TestFlight loop

1. Make and review a focused change

Let the agent inspect first, implement one feature, and report changed files. Review project settings, entitlements, dependency definitions, and data migrations carefully.

2. Run Linux-supported checks

Run portable Swift tests, JavaScript tests, Flutter tests, linters, formatting, and backend tests inside the codespace. These are fast but do not prove the iOS application target.

3. Run the authoritative iOS build

Start a Mac (start_mac, or nomac start), which is ready in about a minute and costs $0.80 an hour, billed per minute. Sync the project and run an unsigned Simulator build with xcodebuild. Read the compiler output before editing after a failure.

Run all supported checks in this codespace. Then start a NoMac Mac, sync the
complete project and build it for the iOS Simulator with xcodebuild. If it
fails, separate source, dependency and project causes. Explain the evidence
before making a fix.

4. Create a real-device checkpoint

Only after the build passes, connect an App Store Connect team key once at nomac.app/apple and let the agent run set_up_signing, archive and export with the commands it returns, and call send_to_testflight. Apple processes the upload, usually in 5 to 15 minutes, then TestFlight makes it available on the iPhone. Test the main task and return screenshots and reproduction steps to the browser agent. Stop the Mac when you are done: the VM is deleted, and the account's 20 GB drive at ~/drive is kept for next time.

Limits to understand

  • ·No Xcode, SwiftUI preview, iOS Simulator, Instruments, or Apple debugger in the codespace itself.
  • ·A stopped codespace preserves storage, but a deleted one removes local-only configuration.
  • ·Compute and storage usage can incur GitHub charges; stop idle environments.
  • ·Browser editing is convenient, but very large visual diffs are easier on a desktop.
  • ·Codespaces secrets are available to processes in the environment; grant repository access narrowly.

Who should use this setup?

It fits people on locked-down Windows computers, Chromebooks, tablets, or frequently changing devices; students who want a reproducible environment; and teams that want the same source tools for every contributor. A Linux VPS is better when you want complete control and a continuously running agent. For simulator-heavy UI work, the cloud Mac's desktop opens in a browser tab with Xcode and the Simulator on it.

Once the TestFlight build is stable, finish with the easiest App Store publishing workflow for 2026. Codespaces remains the workspace; the cloud Mac remains the Apple boundary.

Give your agent a Mac in a minute.

Full macOS with Xcode and root, over MCP, CLI, API or SSH. $0.80 an hour, billed per minute. The Mac is deleted at stop; your 20 GB drive is kept for the next one. No Apple account needed to start.

Get started from $10

7-day money-back guarantee on your first purchase. Credit never expires.

Connect your agent →