I have built a Flutter app. Everything was working fine until I tried to launch it on a physical device. After struggling to find a solution, I changed the Xcode configuration from debug to release and I am now able to launch the app on the physical device (by running flutter run --profile). But now, I can not succeed in launching it on the simulator. I receive the error :
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ id:C80BB36C-4498-4641-92D8-F69090A819A9 }
When I plug the device and run flutter run --profile, he asks me on which profile I want to run the app:
[1]: iPhone de Bernard (00008110-0012642011B8801E)
[2]: iPhone 14 (C80BB36C-4498-4641-92D8-F69090A819A9)
[3]: macOS (macos)
[4]: Chrome (chrome)
The iPhone 14 that Flutter proposes in the profiles is the one that is not found when I try to run the app from Android Studio on the simulator for iPhone 14.
Flutter doctor :
[✓] Flutter (Channel stable, 3.10.5, on macOS 13.4.1 22F82 darwin-arm64, locale fr-BE)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] Connected device (3 available)
[✓] Network resources
• No issues found!
and Xcode 14.3.1
Thanks to this thread, my problem is solved.
Briefly: