3

I'm in the process of setting up my flutter ios app for a cloud build (AppCenter) and I am running into an issue with my xcode config(?).

When building locally, I used to set a linker flag in Xcode to prevent common “double-quoted include” errors. (A known cocoapod issue, apparently...) Ticking the flag in the XCode GUI set CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO in ./ios/Runner.xcodeproj/project.pbxproj and ios/Pods/Pods.xcodeproj/project.pbxproj and allowed the build to finish with lots of warnings but no errors.

I committed both pbxproject files (and even the entire ios/Pods dir) and thought this would save my flag settings, but I had to realize that a build from a fresh checkout regenerates the Pods/ config with a default set to true.

How can I coax the flutter ios config into remembering that flag setting across clean builds?

P.S.: I should mention that I am running a slightly older version of xcode (11.3.1)

duffy
  • 615
  • 1
  • 9
  • 25

2 Answers2

5

In your Podfile, try this :

post_install do |installer|
  installer.pods_project.build_configurations.each do |config|
      config.build_settings['CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER'] = "NO"
    end
end

Then make a pod install

  • not working to me bro [!] The `Sharing [Debug]` target overrides the `CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER` build setting defined in `Pods/Target Support Files/Pods-Sharing/Pods-Sharing.debug.xcconfig'. This can lead to problems with the CocoaPods installation [!] The `Sharing [Release]` target overrides the `CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER` build setting defined in `Pods/Target Support Files/Pods-Sharing/Pods-Sharing.release.xcconfig'. This can lead to problems with the CocoaPods installation – famfamfam Mar 28 '21 at 07:14
5

I found this thread as I was getting warnings when running pod install. If you are having the same issue, here is the fix.

pod warnings

If you search for CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER in your xCode build settings and select Other then type $(inherited) it will fix pod warnings.

build settings