Xcode 12 using Firebase pods. Lexical or Preprocessor issue. “pb.h' file not found with include; use ”quotes“ instead”?

后端 未结 4 615
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-05 10:45

I\'ve just downloaded Xcode 12 beta 6. I\'ve installed firebase into the project and I get this error. When I correct it with the suggestion it then tells me to correct agai

相关标签:
4条回答
  • 2020-12-05 11:17

    I fixed it by using the the pre-release of cocoapods

    sudo gem install cocoapods --pre

    and then doing an update

    pod install --repo-update

    0 讨论(0)
  • 2020-12-05 11:28

    My team didn't want to use cocoapods 1.10 before it's released, and didn't want to re-edit the Pods project's build settings every time a pod install regenerates it. This Podfile post_install step did the trick, credit to Léo-Paul JULIE:

    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
    

    Edit: As snakeoil points out below, you can also silence annoying warnings about irrelevant iOS versions which you are not supporting. But that setting should probably be edited for each target's configuration's build settings, so in a nested loop. All together, I'm going with something like this for now:

    post_install do |installer|
      installer.pods_project.build_configurations.each do |config|
        # Can be removed when moving to cocoapods 1.10
        config.build_settings['CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER'] = 'NO'
      end
      installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
          # Inherit the deployment target defined in this Podfile instead, e.g. platform :ios, '11.0' at the top of this file
          config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
        end
      end
    end
    
    0 讨论(0)
  • 2020-12-05 11:33

    First, check for command line tools and install.

    sudo xcode-select --switch /Applications/Xcode-beta.app
    sudo xcode-select --install
    

    Install cocoapods pre - beta version

    sudo gem install cocoapods --pre
    

    Switch to your xCode Project.

    pod deintegrate
    pod install --repo-update
    
    0 讨论(0)
  • 2020-12-05 11:37

    Update to CocoaPods 1.10, run pod deintegrate and pod install.

    To work around in earlier CocoaPods versions, disable the CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER option in the generate Pods project Build Settings:

    More details in https://github.com/firebase/firebase-ios-sdk/issues/5987 and https://github.com/CocoaPods/CocoaPods/issues/9902.

    0 讨论(0)
提交回复
热议问题