71

I've just update XCode to Version 12 and I'm using Firebase. I've updated pods as well but when I build the project it's giving me error:

Double-quoted include "pb.h" in framework header, expected angle-bracketed instead

These errors are multiple and in the pod of GoogleDataTransport

enter image description here

Even if I replace "" with <> it still doesn't go away.

Chaudhry Talha
  • 7,231
  • 11
  • 67
  • 116
  • 1
    https://github.com/firebase/firebase-ios-sdk/issues/5987 Check the CocoaPods update (might not be officially released yet) – Larme Sep 18 '20 at 08:01
  • Does this answer your question? [Xcode 12, How to suppress "Double-quoted include in framework header" warnings throughout entire project](https://stackoverflow.com/questions/63947317/xcode-12-how-to-suppress-double-quoted-include-in-framework-header-warnings-t) – pawello2222 Sep 18 '20 at 08:02
  • @pawello2222 this doesn't solve it as these are not warnings. – Chaudhry Talha Sep 18 '20 at 08:30
  • Does this answer your question? [Xcode 12 using Firebase pods. Lexical or Preprocessor issue. "pb.h' file not found with include; use "quotes" instead"?](https://stackoverflow.com/questions/63646607/xcode-12-using-firebase-pods-lexical-or-preprocessor-issue-pb-h-file-not-fou) – Paul Beusterien Sep 18 '20 at 14:23
  • 1
    Thanks for asking this question. The answer below really helped me! – Shasha Haven Oct 03 '20 at 09:49
  • 1
    I'm very surprised every single answer for this is to disable the warning. Surely Apple enabled this warning for a reason and we need to fix the root cause? – Darren Nov 18 '20 at 12:49
  • @Darren hahaha I can't agree with you more. I think the fix is on cocoapods side. According to MANY, the fix is already out in one of the latest cocoapods versions. It's not been working for me though. – PhillipJacobs Nov 29 '20 at 00:04
  • Please note this also occurs when you are not using Cocoapods at all, but rather drag&drop frameworks into your project. So I am guessing the problem does not lie within Cocoapods. – hotdogsoup.nl Mar 03 '21 at 09:33

8 Answers8

73
Apparently installing cocoapods version 1.10.0 fixes it all. 
If that doesn't work for you, please continue reading. 
There's lots of temp fixes that'll definitely work for you. 
Here's the command to uninstall and reinstall that 1.10.1 version:

gem uninstall cocoapods; gem install cocoapods -v '1.10.1'

ONLY CONTINUE READING IF THE ABOVE DIDN'T WORK FOR YOU.

If you are an experienced Xcode user, just look at the image below, you'll know exactly what to do, else feel free to follow the detailed steps.

If updating cocoapods didn't work for you, try this...which worked for me.

Please note: This is a workaround. Once cocoapods fix this in future releases, please update cocoapods instead of doing the workaround.

@iHS has a great temp cocoapods fix

@haley-huynh has a great cocoapods update example.

@bogdan-razvan Said that running sudo gem install cocoapods fixed the problem for him ... Maybe give it a shot if not already!

All of those are worth giving a shot before this workaround.

With that said, we don't always have time to wait for fix releases ...So open Xcode and let's get to the workaround.

Step 1: Navigate

  • In your navigator (Project files on the left), click on Pods (It usually has this blue xcode file next to it). Once you clicked on it, it should have opened the pods targets and settings on the right.

Step 2: Build Settings

  • Select Build Settings and then also make sure All is selected out of the three build settings filter types (Basic, Customized and All)

Step 3: Search

  • In the build settings, search for quoted include.
  • You should now see the setting Quoted Include In Framework Header

Step 4: Set to No

  • Change the value of the setting Quoted Include In Framework Header to No

Step 4: Rebuild

  • Rebuild that sexy project of yours!

Step 5: Don't be fooled

  • After rebuilding your project. If you still see errors, make sure to checkout what those errors are because it surely isn't the quote errors.

He's a picture for some visual stimulation: visual representation of the steps to fix

PhillipJacobs
  • 2,337
  • 1
  • 16
  • 32
  • it is already set to no, no effectively translates into 'dont support the double quoted include' am i wrong? – Yadu Sep 23 '20 at 11:03
  • 3
    Thank you so much! Wish I found this earlier! – Shasha Haven Oct 03 '20 at 09:48
  • @Yadu are you saying selecting No didn't work for you ? – PhillipJacobs Oct 03 '20 at 09:54
  • 2
    Nah man, the problem went away when I fixed the cross platform code, I mean in flutter sdk, xcode is new for me – Yadu Oct 03 '20 at 10:03
  • 2
    Thanks homie, you saved me from a lot of headache and lack of sleep :) – jbiser361 Oct 11 '20 at 05:04
  • 1
    Always a pleasure homez! – PhillipJacobs Oct 11 '20 at 06:02
  • 1
    @Yadu Maybe you accidently searched in the Runner target of the Pods target? You find this in the very left column of your Xcode UI. – JtheSaw Oct 12 '20 at 14:54
  • 1
    Running `sudo gem install cocoapods` fixed the problem for me! – Bogdan Razvan Nov 10 '20 at 08:58
  • 2
    @PhillipJacobs Thanks! Solved my issue too. Any idea how to make set it persistently to No? Every time I update pods this setting falls back to Yes and fails. – El Dude Nov 28 '20 at 21:59
  • 1
    @ElDude Glad I could help. Interesting situation you're in. I have the same problem but only when I delete all my `PODS` folder and my `.xcworkspace`. When I do a simple pod update it keeps that setting to NO. I can't remember explicitly setting anything to persist the setting but I'll take some time to see what might cause mine not to switch back and let you know soonest! – PhillipJacobs Nov 29 '20 at 00:08
  • 1
    I have a Ionic app where pods update is run at every build :) . It's annoying but I can manage. – El Dude Nov 29 '20 at 01:17
  • 1
    @ElDude I complete forgot about iHS's answer below. This might just be the solution you're looking for. So just open your podfile and right at the bottom below eveything, add this: https://stackoverflow.com/a/64324297/9669133 – PhillipJacobs Nov 29 '20 at 07:02
  • 1
    @PhillipJacobs Thanks for the link, it worked. I just saw it yesterday but I scripted the YES -> NO switch and have little less manual labor :D – El Dude Feb 05 '21 at 17:04
19

Looks like this issue is fixed as part of Cocoapods 1.10.1 (not officially released, as of this writing). However, you can use Cocoapods version 1.10.0.rc.1 temporarily until 1.10.1 is officially available.

gem install cocoapods -v '1.10.0.rc.1'

Alternative solution

Another option is to update your Podfile (add below code) to disable the warning flag CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER setting for all pods in your project.

post_install do |installer|
  installer.generated_projects.each do |project|
    project.targets.each do |target|
      target.build_configurations.each do |config|
          config.build_settings['CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER'] = 'NO'
      end
    end
  end
end
iHS
  • 5,372
  • 4
  • 31
  • 49
8
rm -rf ~/Library/Developer/Xcode/DerivedData/
rm -rf ~/Library/Caches/CocoaPods/
pod deintegrate
pod update
Haley Huynh
  • 1,392
  • 9
  • 16
4

I solved by updating CocoaPods to the latest stable version, which is 1.9.3, running sudo gem install cocoapods.

After that i updated all my pods with pod update and updated the swift version in Podfile to the last available

config.build_settings['SWIFT_VERSION'] = '5.3'

I checked that the Clang warnings where turned off in Pod's project tab AND GoogleDataTranport's target tag image. As mentioned in https://github.com/firebase/firebase-ios-sdk/issues/5987.

Finally I cleared the build folder with CMD+Shift+K and re-run the project with CMD+R

Dharman
  • 30,962
  • 25
  • 85
  • 135
lpizzinidev
  • 12,741
  • 2
  • 10
  • 29
  • After I updated CocoaPods and pods, I got no error message; but if I click to "update to recommended settings", then the error comes back again. I just don't update for now, but this is not normal. :( – Mike Keskinov Sep 19 '20 at 17:46
  • nah man I'm using the latest version but i still have the errors – Yadu Sep 23 '20 at 11:04
1

https://github.com/firebase/firebase-ios-sdk/issues/5987

The error comes from a new recommended Xcode 12 build setting. We'll investigate an update to nanopb.

In the meantime a workaround is disabling the option in the generate Pods project Build Settings:

Santiago
  • 448
  • 3
  • 12
0

It's a new warning setting in Xcode 12. The issue is gone after updating the pods. And it works until you apply the recommended settings which includes a new warning. After enabling the recommended warnings, the following setting is added to the project file (project.pbxproj), which breaks the compatibility with GoogleDataTransport:

CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;

So, for now, just update your pods and don't update the pods project to the recommended settings. Alternatively, you could update to recommended settings and manually reset the flag afterwards to NO.

cybergen
  • 3,108
  • 1
  • 22
  • 30
  • Dear @cybergen I already update the pods project to the recommended settings... Can you explain how to manually reset the flag to NO ? from where and how to do this?? – Let.Simoo Oct 01 '20 at 17:59
  • 1
    @Let.Simoo I didn't check this, but you should be able to find it in the projects build settings. Maybe search for the term "quoted" or "include". – cybergen Oct 02 '20 at 08:00
  • 1
    Oh, there it is, in the top answer. Look at the screenshot here. https://stackoverflow.com/a/63979662/590947 – cybergen Oct 02 '20 at 08:03
0

The solutions about setting the CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER didn't work for my XCode version that is 12.1. Then I checked my cococapods that was 1.9.3, updated to 1.10.1. After that it all started working.

Yoku
  • 307
  • 5
  • 16
0

To fix this,

Goto Pods > build settings > search for "quoted include" > under "Quoted include in framework header" choose "No"

Xcode version 12.4

Cocoapod version 1.8.4

Exact place of this entry

Akif
  • 73
  • 5