iosflutterxcodemobileversioning

How can I run a Flutter application on past iOS versions?


Edit: My initial problem was due to the problem Flutter failed to build ios app, unsupported option -G for target. With the solution provided on the link I didn't need to downgrade de iOS SDK version.

My project uses Flutter version 3.22.3 and some packages are not compatible with the latest version of iOS, which is iOS 18.0. So I downgraded the iOS version of my Xcode to iOS 17.0 that I know the app can run on.

I'm getting the following error:

iOS 18.0 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.\

I can run the app on the latest versions of Android and this is how I'm debbuging, but I'll eventually need to test it on iOS.

I've researched for it and could not find a solution to run a Flutter app on a previous iOS version.


Solution

  • Just follow this:

    open Xcode, select Xcode > Settings > Platforms, and click the GET button for the required platform.

    It's just saying to install iOS 18 only and after installation simulator will star working. You can change the iOS version settings to 17 later on.