How to reference header files in Bridging-Header.h after updating CocoaPods to 0.36.x and above?

前端 未结 5 1629
醉梦人生
醉梦人生 2020-12-24 01:05

After updating to CocoaPods 0.36.x, I am unable to add imports into my Bridging-Header.h file. I get the \"DBSphereView.h file not found\".

The file is indeed presen

相关标签:
5条回答
  • 2020-12-24 01:25

    In Project > Build Settings > Search Paths > Header Search Paths

    Add:

    "${PODS_ROOT}/Headers/Public/[Name of folder which pod files are contained in]"

    Do that for every pod you installed

    0 讨论(0)
  • 2020-12-24 01:27

    In your Podfile, you specified use_frameworks!.

    As a result, the Objective-C code you're including as a dependency (DBSphereTagCloud) is packaged as a framework, instead of a static library. Please see CocoaPods 0.36 - Framework and Swift Support for more details.

    As a consequence, you don't need a bridging header file. It's enough for you to add:

    import DBSphereTagCloud
    

    in all the Swift files that need that module.

    0 讨论(0)
  • 2020-12-24 01:27

    Try this:

    import  <DBSphereTagCloud/DBSphereView.h>
    import  <DBSphereTagCloud/DBSphereView.h>
    
    0 讨论(0)
  • 2020-12-24 01:28

    I had problems with this. My bridging header wasn't finding pod libs. I ended up finding out that I have to do this.

    0 讨论(0)
  • 2020-12-24 01:44

    For me...

    Original

    import  "<Folder/File.h>"
    

    Change to

    import  <Folder/File.h>
    
    0 讨论(0)
提交回复
热议问题