最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

xcode - Flutter not building ios version - Stack Overflow

programmeradmin3浏览0评论

Every time I flutter build ios or flutter build ipa so I can deploy to app store, I get this error:

Error (Xcode): unsupported option '-G' for target 'arm64-apple-ios16.0' Encountered error while building for device.

I've narrowed it down to the BoringSSL-GRPC dependancy. The -G flag is causing problems with the ARM64 architecture build. It is driving me crazy I do not know what to do.

  1. I built the podfile back up with this and still nothing:
target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0'
      
      if target.name == 'BoringSSL-GRPC'
        # Handle both array and string cases for the flags
        config.build_settings['OTHER_CFLAGS'] = Array(config.build_settings['OTHER_CFLAGS']).reject { |flag| flag == '-G' }
        config.build_settings['OTHER_CXXFLAGS'] = Array(config.build_settings['OTHER_CXXFLAGS']).reject { |flag| flag == '-G' }
        
        # Remove problematic compiler flags
        config.build_settings['COMPILER_INDEX_STORE_ENABLE'] = 'NO'
        config.build_settings.delete('ARCHS')
      end
      
      config.build_settings['ENABLE_BITCODE'] = 'NO'
      config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
    end
  end
end
  1. I looked at all firebase, Xcodes, and apple ID's and its all matching and ready. Everything is updated as well. All dependancies work together.

still nothing what can I do?

Every time I flutter build ios or flutter build ipa so I can deploy to app store, I get this error:

Error (Xcode): unsupported option '-G' for target 'arm64-apple-ios16.0' Encountered error while building for device.

I've narrowed it down to the BoringSSL-GRPC dependancy. The -G flag is causing problems with the ARM64 architecture build. It is driving me crazy I do not know what to do.

  1. I built the podfile back up with this and still nothing:
target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0'
      
      if target.name == 'BoringSSL-GRPC'
        # Handle both array and string cases for the flags
        config.build_settings['OTHER_CFLAGS'] = Array(config.build_settings['OTHER_CFLAGS']).reject { |flag| flag == '-G' }
        config.build_settings['OTHER_CXXFLAGS'] = Array(config.build_settings['OTHER_CXXFLAGS']).reject { |flag| flag == '-G' }
        
        # Remove problematic compiler flags
        config.build_settings['COMPILER_INDEX_STORE_ENABLE'] = 'NO'
        config.build_settings.delete('ARCHS')
      end
      
      config.build_settings['ENABLE_BITCODE'] = 'NO'
      config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
    end
  end
end
  1. I looked at all firebase, Xcodes, and apple ID's and its all matching and ready. Everything is updated as well. All dependancies work together.

still nothing what can I do?

Share Improve this question asked Jan 19 at 1:25 Stuka LabsStuka Labs 12 bronze badges 2
  • Did you try any of the suggestions here: stackoverflow.com/questions/78608693/… – abh Commented Jan 19 at 12:33
  • Yes I did, still nothing. – Stuka Labs Commented Jan 19 at 14:32
Add a comment  | 

1 Answer 1

Reset to default 0

We think this was reported in https://github.com/grpc/grpc/issues/36888

It should be fixed in gRPC 1.65.2 and 1.66.0. Could you try to verify?

Thanks :)

发布评论

评论列表(0)

  1. 暂无评论