在通过cocoapods更新KIF框架后运行以及测试Xcode工作区时出现链接器错误

Har*_*ari 5 kif-framework cocoapods kif ios7 xcode5

我有一个Xcode工作区,我已经更新到KIF 2.0(在podfile中通过终端和pod'bIF'进行pod更新)之后我按照https://github.com/kif-中提供的说明配置了工作区.framework/KIF#configure-the-testing-target(使用Cocoapods部分安装).但是当我尝试执行项目以及运行我的测试目标时,它会抛出错误,

ld: building for iOS Simulator, but linking against dylib built for MacOSX file '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/SenTestingKit.framework/SenTestingKit' for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)

我还检查了以下链接:https://groups.google.com/forum/#!msg/kif-framework/EilvCp2psZA/huUQ3sGpmwQJ.但问题仍然存在.

我该如何纠正?屏幕截图如下.在此输入图像描述

当我尝试使用iPhone 5运行它时,它显示5个链接器错误,例如

ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Library/Frameworks/SenTestingKit.framework/SenTestingKit, missing required architecture armv7s in file /Applications/Xcode.app/Contents/Developer/Library/Frameworks/SenTestingKit.framework/SenTestingKit (2 slices)
Undefined symbols for architecture armv7s:
  "_OBJC_METACLASS_$_SenTestCase", referenced from:
      _OBJC_METACLASS_$_KIFTestCase in libPods.a(KIFTestCase.o)
  "_OBJC_CLASS_$_SenTestCase", referenced from:
      _OBJC_CLASS_$_KIFTestCase in libPods.a(KIFTestCase.o)
      l_OBJC_$_CATEGORY_SenTestCase_$_KIFAdditions in libPods.a(SenTestCase-KIFAdditions.o)
  "_SenTestToolKey", referenced from:
      +[KIFTestActor load] in libPods.a(KIFTestActor.o)
  "_SenSelfTestMain", referenced from:
      +[KIFTestActor load] in libPods.a(KIFTestActor.o)
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

Moh*_*fay 2

转到您的目标设置并将 SenTestingKit 添加到将二进制文件与库链接。