skip to Main Content

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


  1. We had this error as well. The fix was two pronged. We had to add the following to our Podfile:

    post_install do |installer|
      installer.pods_project.targets.each do |target|
        if target.name == ‘BoringSSL-GRPC’
          target.source_build_phase.files.each do |file|
            if file.settings && file.settings[‘COMPILER_FLAGS’]
              flags = file.settings[‘COMPILER_FLAGS’].split
              flags.reject! { |flag| flag == ‘-GCC_WARN_INHIBIT_ALL_WARNINGS’ }
              file.settings[‘COMPILER_FLAGS’] = flags.join(' ’)
            end
          end
        end
    
    // ... your other Podfile settings here 
    

    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

    CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
    

    added to your ios/Runner.xcodeproj/project.pbxproj file for however many targets your project builds to.

    Login or Signup to reply.
  2. any update on this issue ?
    how to solve it i have the same on Xcode 16

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search