gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 03:11:20 24 4
gpt4 key购买 nike

我有一个 Xcode 工作区,其中我已更新到 KIF 2.0(通过终端和 podfile 中的 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 。但问题仍然存在。

我该如何纠正它?下面提供了屏幕截图。 enter image description here

当我尝试使用 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)

enter image description here

最佳答案

最新的 cocoa pod 版本也存在同样的问题。

您可以按照以下步骤解决此问题:

  • 选择 Pod 项目
  • 点击build设置
  • 将“仅构建事件架构”更改为“否”

关于ios7 - 通过 cocoapods 更新 KIF 框架后运行以及测试 Xcode 工作区时出现链接器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19782801/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com