[英]CocoaPods - using the pods in unit test project with link_with
我的xcodeproj中有两个使用CocoaPods的目标,但默认情况下,pod仅应用于第一个目标。
我读到我应该使用link_with命令,但这只会导致错误,例如:
platform :ios, 6.0
link_with ['Proj', 'ProjTests']
pod 'Reachability', '3.1.1'
pod 'SVProgressHUD', '0.9'
pod 'FMDB', '2.1'
结果是
"syntax error, unexpected tSTRING_BEG, expecting kDO or '{' or '('
link_with ['Proj', ProjTests']"
怎么写呢? 我找不到任何好的例子。
看起来需要一些试验和错误,link_with必须是第一条指令。 所以,
link_with ['Proj', 'ProjTests']
platform :ios, 6.0
pod 'Reachability', '3.1.1'
pod 'SVProgressHUD', '0.9'
pod 'FMDB', '2.1'
工作得很好。
您需要在6.0附近使用引号才能使其为'6.0'
请参阅此处的示例http://docs.cocoapods.org/podfile.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.