Hi,
I'm encountering an issue when trying to run my Flutter app on the iOS simulator. The app builds successfully but fails to launch with the following error:
Failed to build iOS app
Uncategorized (Xcode): Unable to find a destination matching the provided destination specifier:
{ id:6925F2DD-5E44-49DD-AB7A-E11C69EFADFD }
Available destinations for the "Runner" scheme:
{ platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00008132-001408142163801C, name:My Mac }
{ platform:iOS, arch:arm64, id:00008130-000459360C42001C, name:iPhone de Leandro }
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
Could not build the application for the simulator.
Error launching application on iPhone Air.
Environment:
The issue happens no matter which emulated device is used.
Hi Ibrahima,
Thank you for reaching out. We understand that your Flutter app builds successfully but fails to launch on the iOS simulator, showing an error related to a missing destination device ID. This error typically means that Xcode (and Flutter) is trying to launch the app on a simulator with a specific device UUID that no longer exists or has been replaced. This can happen due to:
An Xcode update
A macOS update
Flutter cache mismatch
To help resolve this, please follow the steps below:
Step 1: Verify your available simulators
Run the following command. This will list all simulators and their UUIDs. Check if the UUID mentioned in the error (6925F2DD-5E44-49DD-AB7A-E11C69EFADFD) exists. If it doesn’t, that’s likely the issue.
|
xcrun simctl list devices |
Step 2: Reset and recreate simulators
If
the simulator list looks odd or has missing devices, reset them:
|
xcrun simctl delete unavailable xcrun simctl erase all |
Then, open Xcode and create a new simulator:
Go to Xcode → Window → Devices and Simulators → Simulators tab
Click the “+” button to add a new simulator
Choose a model (e.g., iPhone 15) and iOS version (e.g., iOS 18.0)
Step 3: Clean Flutter’s build cache
Sometimes Flutter holds a stale reference to a simulator. Run:
|
flutter clean flutter pub get |
Optionally, reset Xcode’s derived data:
|
rm -rf ~/Library/Developer/Xcode/DerivedData |
Step
4: Specify the correct simulator explicitly
List all simulators Flutter can detect:
|
flutter devices |
You’ll see output like:
|
iPhone 15 Pro (mobile) • A4B5E2... • ios • com.apple.CoreSimulator.SimRuntime.iOS-18-0 |
Now launch using the proper name:
|
flutter run -d "iPhone 15 Pro" |
This ensures Flutter uses the current simulator instead of the stale UUID.
Step 5: Optional sanity checks
If the issue still persists:
Open the iOS simulator manually at least once before running Flutter.
Try running the app directly via Xcode (Runner → Run) to confirm it works.
Ensure your Flutter SDK and Xcode CLI tools are up to date:
|
flutter upgrade xcode-select –install |
Please try these steps and let us know if the issue persists. We’ll be happy to assist further.
Regards,
Natrayan