将cocoapods添加到测试目标中? [英] Add cocoapods to tests target too?

查看:87
本文介绍了将cocoapods添加到测试目标中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有安装了测试和cocoapods的默认项目模板( pod install )。 Pods适用于主要目标,但是当我尝试在测试中导入某些东西时,我会得到类似

I have default project template with tests and cocoapods installed (pod install). Pods works fine with main target, but when I try to import something in tests, I get something like

Time.m:11:9:找不到'NSDate-Utilities.h'文件

这是否意味着我应该将pods目录添加到测试目标中的标题搜索路径?这可以通过cocoapods CLI以某种方式自动完成吗?

Does this mean that I should add pods directory to header search path in tests target? Can this be done via cocoapods CLI automatically somehow?

建议链接的问题在昨天之前有错误答案。

That question by suggested link had WRONG answer until yesterday.

推荐答案

好的,有一个简单的解决方案,请参阅上面的答案,让它自动运行。我必须为项目信息中的测试目标选择 Pods / Pods 配置文件。

Ok, there is a simple solution, see answer above to get this working automatically. I had to select Pods/Pods configuration file for tests target in project info.

这篇关于将cocoapods添加到测试目标中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆