Libraries not found when using CocoaPods with iOS logic tests

前端 未结 14 1353
没有蜡笔的小新
没有蜡笔的小新 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:24

    You can use link_with according to @Keith Smiley solution.

    In case you have common pods, and specifics for each target, you might want to use the "def" option to define group of pods. and use the "def" later in exclusive target.

    def import_pods
        pod 'SSKeychain'
    end
    
    target 'MyProjectTests', :exclusive => true do
      import_pods
    end
    
    target 'MyProject', :exclusive => true do
      import_pods
      pod 'Typhoon'
    end
    

    in the example above, I added 'SSKeychain' to the both targets, and 'Typhoon' only to 'MyProject' target

提交回复
热议问题