添加cocoapodstesting目标呢?

我有安装了testing和cocoapods的默认项目模板( pod install )。 豆荚的主要目标工作正常,但是当我尝试导入testing中的东西时,我得到了类似的东西

Time.m:11:9: 'NSDate-Utilities.h' file not found

这是否意味着我应该将pod目录添加到testing目标中的标题searchpath中? 这可以通过cocoapods CLI自动以某种方式完成吗?


通过build议的链接的这个问题有错误的答案,直到昨天。

好的,有一个简单的解决scheme,请参阅上面的答案自动工作。 我不得不在项目信息中selectPods/Podsconfiguration文件作为testing目标。

配置文件设置

你想使用的是来自你的Podfile 。 就像是:

 link_with 'MainTarget', 'MainTargetTests' 

然后再次运行pod install