Skip to content

Fix xcodebuild: Unable to find a destination matching the provided destination specifier ​

Problem Statement ​

When developing Flutter apps for iOS, you may encounter the frustrating Xcode error:

text
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
        { id:C80BB36C-4498-4641-92D8-F69090A819A9 }

This error typically occurs when:

  1. Switching between running on physical devices and simulators
  2. Changing Xcode build configurations (Release/Debug)
  3. Using outdated or missing iOS simulator runtimes
  4. Having Xcode configuration conflicts or multiple Xcode installations

The core issue involves Xcode's inability to locate a simulator device matching the specific identifier shown in the error message. This creates a barrier to testing and development on iOS simulators after previously working configurations.

Common Trigger

This problem frequently appears after switching to --release or --profile mode to run on physical devices, then attempting to return to simulator testing.

1. Revert Build Configuration in Runner Scheme (When Switching Between Device Types) ​

If you previously modified your Runner Scheme's Build Configuration from Debug to Release (to support physical devices), switch it back:

bash
Steps:
1. Open ios/Runner.xcworkspace in Xcode
2. Go to Product > Scheme > Edit Scheme
3. Under 'Run', set Build Configuration to 'Debug'

Why this works:
Flutter apps cannot run in Release mode on iOS simulators. Changing the scheme forces debug builds for simulators. Always use flutter run --release specifically for physical devices rather than changing the base scheme configuration.

Alternate Terminal Method: ​

bash
flutter clean
flutter config --no-enable-ios-profile-scheme

2. Update "Supported Platforms" Build Setting ​

This is the highest-voted solution from the Flutter community:

  1. Open ios/Runner.xcworkspace in Xcode
  2. Select "Runner" project in left sidebar
  3. Navigate to Build Settings tab
  4. Search for "Supported Platforms"
  5. Change value from iphoneos to iOS
objective-c
// Before:
SUPPORTED_PLATFORMS = iphoneos;

// After:
SUPPORTED_PLATFORMS = ios;

Why this matters:
This setting explicitly tells Xcode to target iOS simulators (iOS) rather than only physical devices (iphoneos).

TIP

After making changes, always run:

bash
flutter clean
flutter run

3. Install Latest iOS Simulator Runtime ​

For Xcode 15+ installations:

  1. Open Xcode
  2. Go to Xcode → Settings → Platforms
  3. Click + next to iOS section
  4. Download the latest runtime

For older Xcode versions:

bash
Go to:
Window → Devices and Simulators → Simulators → +

Critical Note

The iOS version in your simulator must match at least the minimum deployment target specified in your /ios/Podfile.

4. Verify and Select Correct Xcode Version ​

When multiple Xcode versions are installed, ensure you're using the version that supports your simulator:

bash
# Confirm active Xcode:
xcode-select -p

# Switch versions:
sudo xcode-select -s /Applications/Xcode15.app

After changing versions:

bash
flutter clean
pod install --repo-update

Additional Fixes ​

5. Reset or Recreate Runner Scheme ​

For corrupted scheme configurations:

  1. Open Runner.xcworkspace
  2. Product → Scheme → Manage Schemes
  3. Delete existing Runner scheme
  4. Click + to create new "Runner" scheme (check "Shared" box)

6. Reset Simulator Destinations ​

bash
flutter config --clear-ios-signing-cert
rm -rf ios/Flutter/Flutter.podspec
flutter clean

Environment Verification ​

After applying fixes, verify your configuration:

bash
flutter doctor -v

[✓] Flutter (Channel stable, 3.10.5)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✓] Connected device (iOS simulator available)

xcrun simctl list | grep Booted  # Verify running simulators

Conclusion ​

The destination specifier error typically resolves through:

  1. Correcting Build Settings: Especially the Supported Platforms value
  2. Validating Schemes: Debug mode for simulators, Release for devices
  3. Updating Components: Latest iOS runtimes and Xcode selections

Most importantly, avoid modifying runner schemes permanently to accommodate physical device runs—use the flutter run --release command instead when needed. These solutions cover different root causes, so try them in order if your first attempt doesn't resolve the issue.