Skip to content

Turn off CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER in CocoaPod targets - #68817

Merged
fluttergithubbot merged 1 commit into
flutter:masterfrom
jmagman:quoted-includes-pods
Oct 23, 2020
Merged

fluttergithubbot merged 1 commit into
flutter:masterfrom
jmagman:quoted-includes-pods

Conversation

@jmagman

@jmagman jmagman commented Oct 22, 2020 •

Copy link
Copy Markdown
Member

Description

CocoaPods 1.10 does this as of CocoaPods/CocoaPods#9902 to avoid warnings and errors in Xcode 12. Duplicate the behavior in Flutter for users on older versions (minimum required is 1.6, 1.8 is recommended).

This warning plays poorly with pods that also opt into treating warnings as errors, which causes compilation failures, not just warnings:
https://github.com/CocoaPods/Specs/blob/master/Specs/b/c/f/GoogleDataTransportCCTSupport/3.2.0/GoogleDataTransportCCTSupport.podspec.json#L56

Related Issues

Fixes #68813

Tests

I'm not sure how to test this, but I reproduced the compilation failure locally, and confirmed it no longer produces errors or warnings related to quoted includes.

  1. Downgrade from 1.10.
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.9.3
  1. Add any Flutter plugin to a project to produce the ios/Podfile, then to that add GoogleDataTransportCCTSupport
target 'Runner' do
  use_frameworks!
  use_modular_headers!

  pod 'GoogleDataTransportCCTSupport', '3.2.0'
...
  1. cd ios && pod install
  2. Open ios/Runner.xcworkspace in Xcode 12 and turn on "Quoted Include in Framework Header" build setting in the Pods target or run the "Update build settings" migrator thing.
  3. flutter build ios fails
                      In file included from <module-includes>:1:
                      ios/Pods/Target Support Files/nanopb/nanopb-umbrella.h:13:9: error: double-quoted include "pb.h" in framework header, expected angle-bracketed instead
                      [-Werror,-Wquoted-include-in-framework-header]
                      #import "pb.h"
                              ^~~~~~
                              <pb.h>

Apply this patch, no more failures.

@jmagman jmagman self-assigned this Oct 22, 2020
@flutter-dashboard flutter-dashboard Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Oct 22, 2020
@google-cla google-cla Bot added the cla: yes label Oct 22, 2020

@christopherfujino christopherfujino left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suppress "Double-quoted include in framework header" warnings in Pods

3 participants