I just updated my macOS to sequoia 15 and subsequently updated Xcode to 16.0. My flutter application was working just before my update but now running on my ios simulator, i get the following error:
Error output from Xcode build:
↳
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:11CEC440-4A5D-41D2-8FCA-9D2D245137D7, OS:18.0,
name:iPhone 16 }
{ platform:iOS Simulator, id:11CEC440-4A5D-41D2-8FCA-9D2D245137D7, OS:18.0,
name:iPhone 16 }
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/tr/yb7b1tfj3674zn3rlk57mf6r0000gn/T/flutter_tools.COssk3/flutt
er_ios_build_temp_dirTmt5Jl/temporary_xcresult_bundle
clang: error: unsupported option '-G' for target
'x86_64-apple-ios15.0-simulator'
clang: error: unsupported option '-G' for target
'x86_64-apple-ios15.0-simulator'
clang: error: unsupported option '-G' for target
'x86_64-apple-ios15.0-simulator'
If i run some of my other applications, there arent any errors and it runs successfully. It’s only this app that has this error :/
The initial error I got was IPHONEOS_DEPLOYMENT_TARGET not within acceptable version range of 12.0-18.09 but i fixed that with:
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
But now im getting the error above. I also didn’t have to define this config.buildsettings with my other projects. They all have similar packages and have a specified ios version of 12.0.
I’ve also done the following:
flutter pub cache clean
flutter pub cache repair
flutter pub get
pod install
2
Answers
We had this error as well. The fix was two pronged. We had to add the following to our Podfile:
And secondly, in XCode select the Runner under targets, go to Build Settings, and search for "Allow Non-modular Includes In Framework Modules". In the Runner Target column, set it to ‘yes’. Once you make this change you should see this line
added to your
ios/Runner.xcodeproj/project.pbxproj
file for however many targets your project builds to.any update on this issue ?
how to solve it i have the same on Xcode 16