Skip to content

Device Setup

Before connecting your iPhone to Specchio, you need to enable Developer Mode on your device.

Table of Contents

  1. Enable Developer Mode
  2. Trust Your Mac
  3. Enable WiFi Debugging (Optional)
  4. Verify Device Setup

Enable Developer Mode

Developer Mode is required for Specchio to install and run WebDriverAgent on your iPhone.

What is Developer Mode?

Developer Mode is an iOS security feature that allows your device to run development and debugging tools. It's required for:

  • Installing apps from Xcode
  • Running test automation tools (like WebDriverAgent)
  • Debugging apps on device

Is it safe? Yes. Developer Mode is an official Apple feature. It simply allows you to run development tools on your own device. All apps still require your explicit permission.

Step-by-Step Guide

Step 1: Install Xcode on your Mac (if not already done)

Follow the Installation Guide if you haven't installed Xcode yet.

Step 2: Connect your iPhone to your Mac via USB

  1. Use a Lightning or USB-C cable (depending on your iPhone model)
  2. Connect your iPhone to your Mac
  3. Your iPhone may prompt "Trust This Computer?" — tap Trust
  4. Enter your iPhone passcode if prompted

Step 3: Open Xcode

  1. Launch Xcode on your Mac
  2. Go to Settings (or Preferences) from the menu bar
  3. Select the Platforms tab
  4. Your iPhone should appear under "Devices"

Step 4: Enable Developer Mode on your iPhone

For iOS 16+ (Recommended Method):

  1. On your iPhone, open Settings
  2. Go to Privacy & Security
  3. Scroll down and find Developer Mode
  4. Tap it
  5. Toggle Developer Mode to ON
  6. You'll see a warning — tap Restart to reboot your device
  7. After restart, you'll be prompted to confirm — tap Turn On

For iOS 15 or earlier:

Developer Mode is not available on iOS 15 and earlier. You can skip this step, but some features may not work properly.

After Enabling Developer Mode

Once your iPhone restarts:

  1. Unlock your iPhone
  2. Reconnect to your Mac if needed
  3. You may see a prompt to "Trust This Computer" again — tap Trust
  4. Enter your passcode if prompted

Trust Your Mac

Your iPhone needs to trust your Mac for development purposes.

  1. With Xcode open and your iPhone connected via USB
  2. In Xcode, go to SettingsPlatforms
  3. Find your iPhone in the devices list
  4. Click Use for Development
  5. On your iPhone, you'll see a prompt — tap Trust
  6. Enter your passcode if prompted

Manual Trust via Device Settings

If the automatic method doesn't work:

  1. On your iPhone, open Settings
  2. Go to GeneralVPN & Device Management
  3. Look for your "Developer App" certificate
  4. Tap it and tap Trust [Your Name]

Verify Trust

Run this on your Mac:

bash
# List connected iOS devices
xcrun xctrace list devices

# Or use the simpler command
xcrun devicectl list devices

Your iPhone should appear in the list with its name and UDID.


Enable WiFi Debugging (Optional)

WiFi debugging allows you to connect to your iPhone wirelessly. This is convenient but requires both devices to be on the same network.

Requirements

  • Both Mac and iPhone on the same WiFi network
  • iPhone already trusted via USB (see above)
  • Xcode 13+ installed

Step-by-Step Guide

  1. Connect your iPhone to your Mac via USB
  2. Open Xcode
  3. Go to WindowDevices and Simulators
  4. Select your iPhone from the list
  5. Check the box Connect via network
  6. Unplug your iPhone — it should still appear in the list

Method 2: Enable via iPhone Settings (iOS 16+)

  1. On your iPhone, open Settings

  2. Go to Privacy & SecurityDeveloper Mode

  3. Make sure Developer Mode is ON

  4. Stay on this screen

  5. On your Mac, open Xcode

  6. Go to WindowDevices and Simulators

  7. Your iPhone should appear automatically

Verify WiFi Connection

After enabling WiFi debugging:

  1. Unplug your iPhone from USB
  2. On your Mac, run:
bash
xcrun devicectl list devices

Your iPhone should still appear in the list, showing it's connected via WiFi.

Troubleshooting WiFi Connection

If WiFi debugging doesn't work:

  • Ensure both devices are on the same WiFi network (not different VLANs)
  • Try turning WiFi off and on again on both devices
  • Make sure your router allows device-to-device communication
  • Some corporate networks block this feature
  • Try reconnecting via USB and enabling again

Verify Device Setup

Run this diagnostic script to verify everything is ready:

bash
#!/bin/bash
echo "Checking iPhone device setup..."
echo ""

# Check for connected devices
echo "1. Checking for connected iOS devices..."
DEVICES=$(xcrun devicectl list devices 2>&1)
if echo "$DEVICES" | grep -q "iPhone"; then
    echo "   ✅ iPhone found:"
    echo "$DEVICES" | grep "iPhone" | sed 's/^/   /'
else
    echo "   ❌ No iPhone found"
    echo "   Connect your iPhone via USB and ensure it's unlocked"
fi
echo ""

# Check for developer mode (indirect check via device info)
echo "2. Checking device readiness..."
if echo "$DEVICES" | grep -q "iPhone"; then
    echo "   ✅ Device is accessible"
    echo "   Note: Developer Mode status cannot be verified from CLI"
    echo "   Manually verify: Settings → Privacy & Security → Developer Mode"
else
    echo "   ❌ Device not accessible"
fi
echo ""

# Check network connectivity for WiFi debugging
echo "3. Checking for WiFi debugging capability..."
if echo "$DEVICES" | grep -q "network"; then
    echo "   ✅ WiFi debugging appears to be enabled"
else
    echo "   ℹ️  WiFi debugging not detected (USB connection recommended)"
    echo "   To enable: Xcode → Window → Devices and Simulators → Connect via network"
fi
echo ""

echo "Check complete!"

Save and run:

bash
chmod +x check-device-setup.sh
./check-device-setup.sh

Next Steps

With your device set up:

  1. Read First Connection to connect via Specchio
  2. Learn about Connection Modes for USB vs WiFi
  3. Explore Display Modes for different streaming options

Troubleshooting

"Device Not Found" in Xcode

Problem: Your iPhone doesn't appear in Xcode's device list.

Solutions:

  • Try a different USB cable (some cables are charge-only)
  • Try a different USB port on your Mac
  • Restart both your Mac and iPhone
  • Make sure your iPhone is unlocked
  • Check that you've tapped "Trust This Computer"

Can't Enable Developer Mode

Problem: Developer Mode option is missing from Settings.

Solutions:

  • Update to iOS 16 or later (Developer Mode requires iOS 16+)
  • Install Xcode and connect your device first (the option appears after Xcode access)
  • Restart your iPhone after installing Xcode

WiFi Debugging Disconnects

Problem: iPhone disappears from device list when USB is unplugged.

Solutions:

  • Ensure both devices are on the same WiFi network
  • Move closer to your WiFi router
  • Try a different WiFi network (some networks block device discovery)
  • Re-enable WiFi debugging via Xcode

For more help, see the Troubleshooting section.

Released under the MIT License.