Failed to prepare device for development 🍎 iOS

Xcode: Failed to prepare device for development / iPhone is not available. Please reconnect the device

Xcode couldn’t set up the device — usually the device’s iOS version is newer than Xcode supports, Developer Mode is off, or pairing/trust is broken.

Seen on: iOS

Meaning

Each Xcode version supports iOS up to a certain release (needs device support files). iOS 16+ also requires Developer Mode enabled on the device.

Common causes

  • Device iOS newer than this Xcode supports
  • Developer Mode not enabled (iOS 16+)
  • Device not trusted/paired
  • Locked device or cable issues

⚡ Quick fix

  1. Update Xcode
  2. Enable Settings → Privacy & Security → Developer Mode and restart
  3. Unpair/re-pair (Devices and Simulators), trust the computer

Detailed fix by platform

Shell

  1. swift
    xcrun devicectl list devices
    xcrun xctrace list devices

How to diagnose

  1. Versions — Xcode vs iOS version
  2. Developer Mode — On?
  3. Pairing — Trusted?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.