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
- Update Xcode
- Enable Settings → Privacy & Security → Developer Mode and restart
- Unpair/re-pair (Devices and Simulators), trust the computer
Detailed fix by platform
Shell
- swift
xcrun devicectl list devices xcrun xctrace list devices
How to diagnose
- Versions — Xcode vs iOS version
- Developer Mode — On?
- 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:
Similar errors
- Cannot preview in this file SwiftUI Preview: Cannot preview in this file — the preview crashed / failed to build
- doesn't include the currently selected device Provisioning profile "x" doesn't include the currently selected device
- invalid active developer path xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun
Most viewed in iOS
Other ways to find it
🧠 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.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026