Manage Dependencies of Multiple Targets with Cocoapods

ぐ巨炮叔叔 提交于 2019-12-04 05:00:05

By using

target :UnitTests, :exclusive => true do
  pod 'GHUnitIOS', '0.5.6'
end

You're saying that the only library you want to be linked to the UnitTests target is GHUnit mainly saying you don't want AFNetworking to be linked as well. The problem is it looks like you're also importing your AFHTTPClient subclass into UnitTests where it can't find the AFNetworking components it's trying to link to.

To fix this you should be able to remove the exclusive call

target :UnitTests do
  pod 'GHUnitIOS', '0.5.6'
end

With this you will link GHUnit only to your UnitTests target but will link AFNetworking to both. "The target will by default include the dependencies defined outside of the block, unless the :exclusive => true option is given." (from here)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!