我有一个Xcode工作区,在这里我已经更新到KIF 2.0(通过pod和在podfile中的pod&pod'KIF'进行pod更新),然后按照https://github.com/kif-framework/KIF#configure-the-testing-target(installation中的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)
我还检查了此链接: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)
最佳答案
最新的 cocoa pod 版本也有同样的问题。
您可以按照以下步骤解决此问题:
关于ios7 - 通过cocoapods更新KIF框架后,在运行以及测试Xcode工作区时出现链接器错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/19782801/