无论何时建立我的测试目标( 
 Xcode生成的标准目标),构建失败并产生一个隐含的错误: 
  
  
 
framework not found Pods_AppName_AppNameTests
我认为我的测试的pod生成的目标是不能找到的.
我的podfile很简单:
use_frameworks!
target 'AppName' do
  pod 'ReactiveCocoa'
  pod 'RealmSwift'
  pod 'ObjectMapper'
  pod 'Moya'
  pod 'Moya/ReactiveCocoa'
  pod 'pop'
  pod 'Heimdallr'
  pod 'Heimdallr/ReactiveCocoa'
  pod 'Alamofire'
  pod 'AlamofireImage'
  pod 'SwiftDate'
  pod 'DropdownAlert'
  pod 'NibDesignable'
  target 'AppNameTests' do
    pod 'Quick'
    pod 'Nimble'
  end
end 
 我使用Cocoapods 1.0.1.
编辑:
它不是我的podfile的格式.这是通过运行pod init给我的默认设置.可能很可能是Cocapods中的错误,但格式是正确的.
编辑2:
如果我包括:
inherit! search_paths
在我的测试目标中,测试失败了:
The bundle “MyApp_Tests” Couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.
没有这一行,测试也无法构建,但这次使用链接器错误:
Ld /Users/travis/Library/Developer/Xcode/DerivedData/Reactify-fqgxzcgedmqljrangqdkxpwdfxne/Build/Intermediates/Reactify.build/Debug-iphonesimulator/Reactify_Tests.build/Objects-normal/i386/Reactify_Tests normal i386
那个特殊的错误是来自Travis,但是我在Xcode本地得到同样的错误.
解决方法
 我上周一直在和这个战斗 – 我最终发现可靠地工作的“解决方案”是添加继承! search_paths,pod安装,然后从测试目标中删除它,并再次安装pod,如下所示: 
  
  
 
        source 'https://github.com/CocoaPods/Specs.git' project 'CityWeather/CityWeather.xcodeproj' install! 'cocoapods',:deterministic_uuids => false use_frameworks! platform :ios,'9.3' abstract_target 'CityWeather_Base' do <... pod list here,contents don't seem to matter ...> target 'CityWeather' do end target 'CityWeatherTests' do # NB. If it starts refusing to link the test frameworks,# adding and then removing inherit! :search_paths here appears to help. #inherit! :search_paths end end
这不至于每次发生在你身上创造一个新的目标,这是我上个星期我预测会发生在你身上的麻烦.很烦人.花费了很多时间,尽可能多地尝试从发生问题的提交日志中推断出来,但并不直接显而易见.我会在这里更新,如果我设法找到时间来解决问题足以打开一个有用的问题.但在此期间,希望我的“解决方案”会提高你的生产力.