Libraries not found when using CocoaPods with iOS logic tests

前端 未结 14 1399
没有蜡笔的小新
没有蜡笔的小新 2020-11-29 15:41

I am trying to write some iOS logic tests against classes in my project that use functionality from some of the libraries in my podspec. I am using the standard unit test bu

14条回答
  •  不知归路
    2020-11-29 16:26

    My solution to this problem was to change my Podfile to include the library in both targets like this

    target "MyApp" do  
        pod 'GRMustache', '~> 7.0.2'
    end
    
    target "MyAppTests" do
        pod 'GRMustache', '~> 7.0.2'
    end
    

    And since I'm using swift I also had to configure the test target to include the MyApp-Bridging-Header.h file. (In the Swift Compiler group under the Build Settings tab)

提交回复
热议问题