Free preview lesson
Get your iPhone ready to connect
Connect your iPhone to your Mac with a cable
Why this matters: Xcode, Apple's app-building tool, needs to talk directly to your iPhone to install the app you built. A wireless connection can work later, but a cable is the most reliable way to start, so every step after this depends on it.
Use a cable that carries data, not just power. Some cheap cables only charge the phone and will never show your iPhone in Xcode. If the phone charges but nothing else happens, swap the cable first.
Here is how to connect:
- Plug the cable into your Mac directly, or into a powered USB hub you trust.
- Unlock your iPhone with your passcode.
- If a message says Trust This Computer, tap Trust.
- Enter your iPhone passcode when asked to confirm.
- Open Xcode and check the device menu at the top of the window. Your iPhone should appear there by name.
If the phone does not show up, unplug and replug the cable, make sure the phone is unlocked, and try another USB port. Restarting both devices also fixes many connection problems.
What to do now: connect your iPhone with a data cable, tap Trust if prompted, and confirm the phone appears in Xcode's device menu.