# Upgrade the iOS SDK on a Rented Mac Safely

Canonical: https://figment.so/blog/mac-ios-sdk-upgrade-remote-mac

Keep both Xcode versions on disk, switch with xcode-select, build with each, and retire the old one only when every job is green. Xcode 26.4 and later need an Apple silicon plan; the Intel Mac VM stops at Xcode 26.3.

**Install the new Xcode beside the old one, run your build pipeline against each, compare the output, and retire the old toolchain only after every job is green.** A rented Mac is a good place for this: the machine you experiment on is not the one you ship from, so a bad upgrade cannot derail a release in flight. If the new Xcode is 26.4 or later, the machine must be an Apple silicon plan, because the Intel Mac VM runs macOS Sequoia and tops out at Xcode 26.3.

## Why do SDK upgrades break builds?

An Xcode upgrade changes three things that can silently break an existing project:

1. **API deprecations become errors.** Symbols flagged with `@available` or deprecated in the old SDK can turn into hard errors in the new one. A build that passed last week fails today with no code changes.
2. **Info.plist key requirements change.** New iOS majors add privacy manifest entries and tighten accepted values. Missing keys show up at upload or review time, not at build time.
3. **Entitlement rules shift.** Capabilities that were optional or implicit become mandatory. The symptom is a codesign failure during archive export, not a compile error.

Compile against the new SDK, treat every warning as a future error, and fix entitlement and Info.plist issues before you switch the primary pipeline.

## Which Mac can run the Xcode I want?

Confirm the rented Mac can run the Xcode you want before you download anything.

| Xcode | iOS SDK | Where it runs |
|---|---|---|
| Xcode 26.0 to 26.3 | iOS 26 | macOS Sequoia (Apple's table), so the Intel Mac VM or an Apple silicon Mac |
| Xcode 26.4 and later | iOS 26 | macOS Tahoe 26.2 or later, so an Apple silicon plan |
| Xcode 27 | iOS 27 | macOS Tahoe 26.6 or later, Apple silicon only; Xcode 27 can still cross-build x86_64 for macOS 27, but the IDE does not run on Intel |

Apple's porting guide says Intel Macs must use Xcode 26 or an earlier release ([developer.apple.com/documentation/apple-silicon/porting-your-macos-apps-to-apple-silicon](https://developer.apple.com/documentation/apple-silicon/porting-your-macos-apps-to-apple-silicon)). Xcode 26 bundles the iOS 26 SDK, which meets the App Store submission floor in force since April 28, 2026 ([developer.apple.com/news/upcoming-requirements](https://developer.apple.com/news/upcoming-requirements/)). macOS Tahoe still installs on several late-model Intel Macs per [Apple's compatibility list](https://support.apple.com/en-us/122867), so the Apple silicon constraint is specific to the Xcode 27 IDE, not to Tahoe. Different Xcode 26 minor releases need different macOS minimums, so check the exact pair in the [Xcode release notes](https://developer.apple.com/documentation/xcode-release-notes) and in [Apple's Xcode system requirements](https://developer.apple.com/xcode/system-requirements). Figment pins tested macOS and tool versions and shows them before purchase, and guest OS upgrades are scheduled with your consent, so read the macOS version shown for an Apple silicon plan before you pick it.

## How do I install the new Xcode alongside the old one?

Never overwrite `/Applications/Xcode.app` while a build job holds it. Rename the current install and expand the new one into a separate path:

```bash
# No build jobs should be running at this point.

# 1. Rename the current Xcode to a versioned path
sudo mv /Applications/Xcode.app /Applications/Xcode-26.app

# 2. Expand the new Xcode download (adjust the filename to match your download)
cd ~/Downloads
xip --expand Xcode_27.xip
sudo mv ~/Downloads/Xcode.app /Applications/Xcode-27.app

# 3. Accept the license for the new install
sudo /Applications/Xcode-27.app/Contents/Developer/usr/bin/xcodebuild -license accept

# 4. Register the new install with Launch Services
sudo xcode-select --switch /Applications/Xcode-27.app
sudo xcodebuild -runFirstLaunch
```

Both versions now coexist. `xcode-select` decides which toolchain `xcodebuild` and every `xcrun` call resolve against. A full Xcode install is typically 15 to 20 GB (see the cleanup section), so two installs take roughly 30 to 40 GB. Check free space first: the Intel Mac VM has an 80GB SSD and the Apple Silicon Mac VM has 65GB, both including the OS.

## How do I switch the active toolchain with xcode-select?

```bash
# Point the system at the new Xcode
sudo xcode-select --switch /Applications/Xcode-27.app

xcodebuild -version                       # should report Xcode 27.x
xcrun --sdk iphoneos --show-sdk-version   # should report the iOS 27 SDK

# Back to the old Xcode when you want the shipping toolchain
sudo xcode-select --switch /Applications/Xcode-26.app
xcodebuild -version                       # should report 26.x
```

Keep the two developer directory paths in a note or in your CI job variables. Typos are the most common cause of "which Xcode just built this" confusion.

## How do I build against both SDKs with one script?

Save this as `build-both-sdks.sh`. It takes your own scheme and workspace as arguments and does not invent a scheme name. It stops the moment either build fails, so a red run cannot pass as a fast success.

```bash
#!/usr/bin/env bash
# build-both-sdks.sh
# Usage: ./build-both-sdks.sh MyScheme /path/to/MyApp.xcworkspace
set -euo pipefail

SCHEME="${1:?Usage: $0 SCHEME WORKSPACE}"
WORKSPACE="${2:?Usage: $0 SCHEME WORKSPACE}"

XCODE_OLD=/Applications/Xcode-26.app
XCODE_NEW=/Applications/Xcode-27.app

build_with () {
  local xcode_path="$1"
  local label="$2"
  local log
  log="$(mktemp -t xcb-"${label// /_}").log"

  echo ""
  echo "=== Building with ${label} ==="
  sudo xcode-select --switch "${xcode_path}"
  xcodebuild -version

  # pipefail ensures a failing xcodebuild fails the whole pipeline
  xcodebuild \
      -workspace "${WORKSPACE}" \
      -scheme    "${SCHEME}" \
      -sdk       iphonesimulator \
      -destination 'generic/platform=iOS Simulator' \
      clean build \
      CODE_SIGN_IDENTITY="" \
      CODE_SIGNING_REQUIRED=NO \
      CODE_SIGNING_ALLOWED=NO \
      | tee "${log}"

  echo "--- ${label}: build succeeded (log: ${log}) ---"
}

build_with "${XCODE_OLD}" "Xcode 26 (old SDK)"
build_with "${XCODE_NEW}" "Xcode 27 (new SDK)"

echo ""
echo "Review deprecation warnings in the Xcode 27 log before retiring Xcode 26."
```

The script disables signing for the validation build only. For a signed archive, drop the three `CODE_SIGN*` overrides and keep certificates in your CI secret manager, never in environment dumps or shell history. If you run the script from an unattended CI job, replace `sudo xcode-select --switch` with a passwordless sudoers rule scoped to that one command on the rented Mac.

## How do I test simulator targets on the new runtime?

The new Xcode ships with new simulator runtimes. Install them, then run your test suite:

```bash
# What is already installed and what is downloadable
xcrun simctl list runtimes

# Pull the matching iOS platform assets for the active Xcode
xcodebuild -downloadPlatform iOS

# Run the tests on the new runtime after switching
sudo xcode-select --switch /Applications/Xcode-27.app
xcodebuild test \
    -workspace MyApp.xcworkspace \
    -scheme    MyScheme \
    -destination 'platform=iOS Simulator,name=iPhone 16 Pro,OS=latest'
```

Keep the old runtime installed until the new one is green. Multiple runtimes coexist without interference, so there is no reason to delete the shipping one early.

## How do I reclaim disk after the migration?

Once every build job, CI pipeline and TestFlight submission has moved to the new SDK:

```bash
# 1. Retire the old Xcode
sudo rm -rf /Applications/Xcode-26.app

# 2. Drop simulator runtimes no longer tied to an installed Xcode
xcrun simctl delete unavailable

# 3. Clear build caches accumulated during overlap testing
rm -rf ~/Library/Developer/Xcode/DerivedData/*
```

A full Xcode install is typically 15 to 20 GB on disk, and each unused simulator runtime is several GB more. A migration cycle usually frees 25 to 30 GB once the cleanup above is done, depending on how many runtimes you kept side by side.

## Which Figment Mac plan fits an SDK upgrade?

Do the upgrade on the [Apple Silicon Mac VM](/mac-hosting#apple-silicon-vm) ($39 a month, $6 a day) if your target is Xcode 26.4 or later, or on the [Dedicated M4 Pro 48 GB](/mac-hosting#dedicated-m4-pro) ($349 a month, or $299 a month on a 12-month term) if you want a whole Mac for the migration. The [Intel Mac VM](/mac-hosting#intel-vm) ($25 a month, $2 a day) works as a cheap second environment that keeps your Xcode 26.3 build alive during the transition.

A two-month overlap, keeping the old Intel toolchain on the Intel VM while you validate on an Apple Silicon VM, costs $25 + $39 = $64 a month, or $128 for two months. After you retire the Intel host, the Apple Silicon VM continues at $39 a month. If one month of overlap is enough, the overlap costs one extra $25. For a short validation, three days on the Apple Silicon VM is 3 × $6 = $18. Disconnecting or shutting down macOS does not stop billing. Plans are at [/mac-hosting](/mac-hosting).

New SDK builds produce new dSYMs, and the [crash log symbolication guide](/blog/mac-crash-log-symbolication-remote) covers matching them during an overlap. Use the [AddressSanitizer guide](/blog/mac-address-sanitizer-xcode-remote) for a memory-safety pass against the new SDK before you ship, and the [GitHub Actions self-hosted runner guide](/blog/mac-github-actions-self-hosted-runner) to drive both Xcode versions from one staged CI pipeline.
