Issue Running iOS 17.4 Simulator in Xcode with Flutter
Hello everyone,
I'm currently facing an issue with running my Flutter app on an iOS 17.4 simulator. Even though I have iOS 17.4 installed, Xcode and Flutter are insisting that I need to download and use iOS 17.5, which I do not want to do due to specific project requirements.
The Problem
When I attempt to run my app using the iOS 17.4 simulator, I receive the following error:
Failed to build iOS app
Uncategorized (Xcode): Unable to find a destination matching the provided destination specifier:
{ id:30CEF98C-F08B-4CC9-8662-6A73B903E922 }
Ineligible destinations for the "Runner" scheme:
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device, error:iOS 17.5 is not installed. To use with Xcode,
first download and install the platform }
Additionally, Xcode keeps prompting me to download iOS 17.5. However, when I attempt to download it, it consumes a lot of data and eventually fails with the message:
iOS 17.5 Simulator - Failed - Registering simulator runtime with CoreSimulator failed to download
Steps I've Taken but issue not solved so hey there please help me
-
Verified Installed Runtimes in Xcode:
- Opened Xcode and navigated to
Xcode
>Settings
>Platforms
. - Confirmed that iOS 17.4 is listed and installed.
- Opened Xcode and navigated to
-
Checked and Updated Podfile:
- Edited
ios/Podfile
to set the platform to iOS 17.4:platform :ios, '17.4'
- Reinstalled pods:
- Edited
cd ios pod install cd ..
```
- Cleaned Flutter and iOS Build Artifacts:
> flutter clean
4. **Opened the iOS Project in Xcode:**
- Ensured the deployment target is set to 17.4 for all configurations.
- Selected the iPhone 15 Pro (iOS 17.4) simulator from the device menu.
5. **Built Directly in Xcode:**
- Built the project by selecting `Product` > `Build` from the Xcode menu and addressed any errors.
6. **Reset Simulators:**
- Deleted all simulators and recreated the iPhone 15 Pro with iOS 17.4:
```sh
xcrun simctl delete all
xcrun simctl create "iPhone 15 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-15-Pro com.apple.CoreSimulator.SimRuntime.iOS-17-4
```
7. **Verified Available Devices and Ran Again:**
- Listed available devices:
```sh
flutter devices
```
- Ran the app specifying the correct device ID:
```sh
flutter run -d 30CEF98C-F08B-4CC9-8662-6A73B903E922
```
8. **Updated Flutter and Xcode:**
- Ensured both Flutter SDK and Xcode are updated to their latest versions:
```sh
flutter upgrade
```
9. **Ran Flutter Doctor:**
- Diagnosed any underlying issues:
```sh
flutter doctor
```
#### Request for Help
Despite these efforts, I am still unable to run my Flutter app on the iOS 17.4 simulator. Xcode continues to prompt for iOS 17.5, and the download consistently fails, consuming significant data.
I am looking for a solution that allows me to use the iOS 17.4 simulator without having to upgrade to iOS 17.5. If anyone has encountered this issue or has any suggestions on how to resolve it, your help would be greatly appreciated!
i am getting this in terminal,
flutter run
Launching lib/main.dart on iPhone 15 Pro in debug mode...
Updating project for Xcode compatibility.
Upgrading project.pbxproj
Upgrading Runner.xcscheme
Running pod install... 1,064ms
Running Xcode build...
Xcode build done. 1.9s
Failed to build iOS app
Uncategorized (Xcode): Unable to find a destination matching the provided destination specifier:
{ id:FBAFE907-664B-4D4F-833F-B9E58B0B944A }
Ineligible destinations for the "Runner" scheme:
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device, error:iOS 17.5 is not installed. To use
with Xcode, first download and install the platform }
════════════════════════════════════════════════════════════════════════════════
iOS 17.5 is not installed. To download and install the platform, open
Xcode, select Xcode > Settings > Platforms, and click the GET button for the
required platform.
For more information, please visit:
https://developer.apple.com/documentation/xcode/installing-additional-simulator-runtimes
════════════════════════════════════════════════════════════════════════════════
Could not build the application for the simulator.
Error launching application on iPhone 15 Pro.