Xcode 6.1 dyld:库未加载:@rpath/XCTest.framework/XCTest 错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27691432/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode 6.1 dyld: Library not loaded: @rpath/XCTest.framework/XCTest error
提问by Vaibhav
I imported my old project in Xcode 6.1and error mentioned above started coming during runtime, with reason image not found,I have tried all off the answers suggested in following link
我在Xcode 6.1 中导入了我的旧项目,并且在运行时开始出现上面提到的错误,原因是 找不到图像,我已经尝试了以下链接中建议的所有答案
but none of them worked for me so far,so does anybody have any idea how to get rid of this problem.
但到目前为止,他们都没有对我来说有效,所以有人知道如何摆脱这个问题。
any help will be appreciated.
任何帮助将不胜感激。
回答by ha100
This was used for betfair/aping-ios-sdk
这用于betfair/aping-ios-sdk
1) Go to Project settings-> App Main Target-> Build Phases-> Link Binary With Librariesand make sure you have XCTest.frameworks in there
1) 转到Project settings-> App Main Target-> Build Phases-> Link Binary With Libraries并确保那里有 XCTest.frameworks
if not, click +button, then Add OtherFramework
如果没有,请单击+按钮,然后添加其他框架
then press together CMD + SHIFT + Gand enter
然后一起按CMD + SHIFT + G并输入
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks
if you need it for simulator, you need to alter the path appropriately
如果模拟器需要它,则需要适当地更改路径
press ENTERand select the XCTest.framework
按ENTER并选择XCTest.framework
2) now it is present in bundle just make it optional as seen in first image and you should be good to go
2)现在它存在于捆绑包中,只需将其设为可选,如第一张图片所示,您应该很高兴
回答by Harikant Jammi
If you are using cocoapods you might need to do pod update, that worked for me
如果您使用的是 cocoapods,则可能需要进行 pod 更新,这对我有用