Xcode 5抛出“未加载库”添加测试目标时出错 [英] Xcode 5 throws "Library not loaded" error when adding a test target

查看:182
本文介绍了Xcode 5抛出“未加载库”添加测试目标时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试使用Add Target - > Add Cocoa Touch Unit Testing Bundle在Xcode 5上添加一个测试目标。但是,当我运行测试,我得到以下错误:

I've tried adding a test target on Xcode 5 using the Add Target -> Add Cocoa Touch Unit Testing Bundle. However, when I run the test, I get the following error:


2013-09-24 10:43:14.446堆栈交换[48895 :c07] 加载时出错
/ Users / arielitovsky / Library / Developer / Xcode / DerivedData / MyApp-fjegcztcnwxqdfdimhonqzzqpdwr / Build / Products / Debug-iphonesimulator / Stack
Exchange Tests.xctest / Stack Exchange测试:
dlopen(/ Users / arielitovsky / Library / Developer / Xcode / DerivedData / MyApp-fjegcztcnwxqdfdimhonqzzqpdwr / Build / Products / Debug-iphonesimulator / Stack
Exchange Tests.xctest / Stack Exchange Tests, 262):未加载库
/Developer/Library/Frameworks/XCTest.framework/XCTest引用
从:
/ Users / arielitovsky / Library / Developer / Xcode / DerivedData / MyApp-fjegcztcnwxqdfdimhonqzzqpdwr / Build / Products / Debug-iphonesimulator / Stack
Exchange Tests.xctest / Stack Exchange 测试原因:找不到图片
IDEBundleInjection.c: strong>
'/ Users / arielitovsky / Library / Developer / Xcode / DerivedData / MyApp-fjegcztcnwxqdfdimhonqzzqpdwr / Build / Products / Debug-iphonesimulator / Stack
Exchange Tests.xctest'程序以退出代码结束:0

2013-09-24 10:43:14.446 Stack Exchange[48895:c07] Error loading /Users/arielitovsky/Library/Developer/Xcode/DerivedData/MyApp-fjegcztcnwxqdfdimhonqzzqpdwr/Build/Products/Debug-iphonesimulator/Stack Exchange Tests.xctest/Stack Exchange Tests: dlopen(/Users/arielitovsky/Library/Developer/Xcode/DerivedData/MyApp-fjegcztcnwxqdfdimhonqzzqpdwr/Build/Products/Debug-iphonesimulator/Stack Exchange Tests.xctest/Stack Exchange Tests, 262): Library not loaded: /Developer/Library/Frameworks/XCTest.framework/XCTest Referenced from: /Users/arielitovsky/Library/Developer/Xcode/DerivedData/MyApp-fjegcztcnwxqdfdimhonqzzqpdwr/Build/Products/Debug-iphonesimulator/Stack Exchange Tests.xctest/Stack Exchange Tests Reason: image not found IDEBundleInjection.c: Error loading bundle '/Users/arielitovsky/Library/Developer/Xcode/DerivedData/MyApp-fjegcztcnwxqdfdimhonqzzqpdwr/Build/Products/Debug-iphonesimulator/Stack Exchange Tests.xctest' Program ended with exit code: 0

为什么不起作用?

推荐答案

您必须在iOS 7模拟器上运行测试。它不会在iOS 6.x上工作。

You must run your test on the iOS 7 simulator. It will not work on iOS 6.x.

这篇关于Xcode 5抛出“未加载库”添加测试目标时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆