大佬教程收集整理的这篇文章主要介绍了objective-c – 无法在单元测试中使用Cocoapod,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
platform :ios,'9.0' def temple8 pod 'j2objc-temple8-debug',:configuration => ['Debug'],:path => '../temple8/build/j2objcOutputs' pod 'j2objc-temple8-release',:configuration => ['Release'],:path => '../temple8/build/j2objcOutputs' end target 'cartful-ios' do use_frameworks! temple8 pod 'Stripe' pod 'Alamofire','~> 4.0' pod 'FontAwesomeKit',:git => 'https://github.com/PrideChung/FontAwesomeKit.git' pod 'KeychainAccess' pod 'pop','~> 1.0' pod 'libPhonenumber-iOS','~> 0.8' pod 'AsyncDisplayKit',:git => 'https://github.com/facebook/AsyncDisplayKit.git' pod 'Intercom' pod 'Mixpanel-swift' pod 'UICounTingLabel' pod 'DTFoundation' target 'cartful-iosTests' do inherit! :search_paths temple8 end target 'cartful-iosUITests' do inherit! :search_paths temple8 end end post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_setTings['SWIFT_VERSION'] = '3.0' end end end
我需要在我的测试中引用temple8的部分,这就是我将它包含在两个测试目标中的原因.但是当我运行任何测试时,我会得到一长串错误,如下所示:
我最初认为类的重复是由于在测试目标和应用程序目标中包含temple8引起的.但是,如果我从测试目标中删除temple8,任何时候我尝试使用@testable import …在我的测试中,我得到了一个
Failed to import bridging header...
> Class PLBuildVersion is implemented in both frameworks
> Class PLBuildVersion is implemented in both/Applications
以上是大佬教程为你收集整理的objective-c – 无法在单元测试中使用Cocoapod全部内容,希望文章能够帮你解决objective-c – 无法在单元测试中使用Cocoapod所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。