Skip to content

Xcode Development

Install Xcode, build and test from the command line, use simulators and handle code signing on a remote Mac.

On this page

Install Xcode

Xcode is free. The simplest route is the Mac App Store over Screen Sharing (sign in with your own Apple Account). You can also download a specific version from developer.apple.com/download (opens in a new tab).

For command-line tools only (git, clang, make), without the full IDE. This opens an install dialog on the Mac's screen, so run it in Terminal over Screen Sharing:

Terminal
$ xcode-select --install

First-launch setup

After installing Xcode, point the command-line tools at it, accept the licence and install the required components:

Terminal
$ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer$ sudo xcodebuild -license accept$ sudo xcodebuild -runFirstLaunch$ xcodebuild -version

Simulators

Terminal
# Download the iOS simulator runtime (Xcode 15 and later)$ xcodebuild -downloadPlatform iOS# List available simulators$ xcrun simctl list devices available

Build and test

Terminal
$ xcodebuild -scheme <Scheme> \    -destination 'platform=iOS Simulator,name=<Device name>' \    build$ xcodebuild test -scheme <Scheme> \    -destination 'platform=iOS Simulator,name=<Device name>'

Code signing over SSH

Signing identities live in your login keychain, which is locked in a fresh SSH session. Unlock it before signing builds from the command line:

Terminal
$ security unlock-keychain ~/Library/Keychains/login.keychain-db

Limitations

  • Physical iPhones, iPads and other USB devices cannot be connected to a remote Mac. Test on the Simulator, or distribute builds to your devices through TestFlight.
  • Distributing apps through the App Store or TestFlight requires your own Apple Developer Program membership, which is not included.

Need a hand? Check the status page or contact support.