Added unit testing target to Xcode - failed to import bridging header won't go away

前端 未结 5 1214
轻奢々
轻奢々 2020-12-13 23:47

I added a new Test target to my Xcode project. My project has Swift code and Objective-C code, and has a bridging header. Upon either adding the bridging header to UnitTesti

5条回答
  •  [愿得一人]
    2020-12-14 00:38

    @Victor Choy solution works for me, but I had to move test target inside product target like so:

    target 'YourProduct' do
    
       # Pods for product
    
       target 'YourProductTests' do
          inherit! :search_paths
          # Pods for product testing
       end
    end
    

    This did not work for me:

    target 'YourProduct' do
       # Pods for product
    end
    
    target 'YourProductTests' do
       inherit! :search_paths
       # Pods for product testing
    end
    

提交回复
热议问题