Failed to import bridging header

前端 未结 9 1623
逝去的感伤
逝去的感伤 2020-12-01 09:19

I\'ve read a lot of questions and answers that deal with a similar issue, but I have yet to find a solution. If anyone could shed some light, that would be wonderful.

相关标签:
9条回答
  • 2020-12-01 10:10

    If you use CocoaPods this could save your time. 1) The first what you need to do is to check your Podfile it will be like:

    target 'YourProjTests' do
        inherit! :search_paths
    end
    
    target 'YourProjUITests' do
        inherit! :search_paths
    end
    

    2) Open baseproj configuration and set for test targets correct Pods-Proj.debug , see attached image:

    0 讨论(0)
  • 2020-12-01 10:14

    One case is that if import <Chartboost+Extention/Chartboost+Extention.h> ,

    The right way is to import <Chartboost**_**Extention/Chartboost+Extention.h> ,

    Just because Pod build will change the framework name of Chartboost+Extention into Chartboost_Extention

    0 讨论(0)
  • 2020-12-01 10:15

    If you have these lines in you bridging header:

    #ifndef Bridging_Header_h
    #define Bridging_Header_h
    
    #endif /* Bridging_Header_h */
    

    Just delete them, it will solve the problems of Foundation and UIKit.

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