我在我的应用程序中使用DropBox Core API,因此,我必须包含XCTest框架,因为,当我没有添加XCTest框架时,我的应用程序无法连接到Dropbox,但是当我添加框架时,我在为模拟器构建时出错.我的代码没有错!这是错误:
Ld /Users/Zach/Library/Developer/Xcode/DerivedData/SnapDrop!-fchnxyvnqyeefscfhmohrzxtiqeb/Build/Products/Debug-iphonesimulator/SnapDrop!.app/SnapDrop! normal i386
cd "/Users/Zach/Desktop/SnapDrop!"
setenv IPHONEOS_DEPLOYMENT_TARGET 6.1
setenv PATH "/Applications/Xcode5-DP6.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode5-DP6.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode5-DP6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode5-DP6.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -L/Users/Zach/Library/Developer/Xcode/DerivedData/SnapDrop!-fchnxyvnqyeefscfhmohrzxtiqeb/Build/Products/Debug-iphonesimulator -F/Users/Zach/Library/Developer/Xcode/DerivedData/SnapDrop!-fchnxyvnqyeefscfhmohrzxtiqeb/Build/Products/Debug-iphonesimulator -F/Users/Zach/Downloads/dropbox-ios-sdk-1.3.5 -F/Users/Zach/Downloads/dropbox-ios-sync-sdk-1-1.1.0 -F/Applications/Xcode5-DP6.app/Contents/Developer/Library/Frameworks -F/Users/Zach/Desktop -filelist /Users/Zach/Library/Developer/Xcode/DerivedData/SnapDrop!-fchnxyvnqyeefscfhmohrzxtiqeb/Build/Intermediates/SnapDrop!.build/Debug-iphonesimulator/SnapDrop!.build/Objects-normal/i386/SnapDrop!.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.1 -framework iAd -framework AssetsLibrary -framework QuartzCore -framework SystemConfiguration -framework Security -framework CFNetwork -framework XCTest -framework Dropbox -framework DropboxSDK -framework CoreGraphics -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/Zach/Library/Developer/Xcode/DerivedData/SnapDrop!-fchnxyvnqyeefscfhmohrzxtiqeb/Build/Intermediates/SnapDrop!.build/Debug-iphonesimulator/SnapDrop!.build/Objects-normal/i386/SnapDrop!_dependency_info.dat -o /Users/Zach/Library/Developer/Xcode/DerivedData/SnapDrop!-fchnxyvnqyeefscfhmohrzxtiqeb/Build/Products/Debug-iphonesimulator/SnapDrop!.app/SnapDrop!
ld: building for iOS Simulator, but linking against dylib built for MacOSX file …Run Code Online (Sandbox Code Playgroud) 我正在寻找Xcode中目标成员资格的示例.我对它的确切含义感到有些困惑.例如,我有两个不同的目标成员资格.myApp和myAppTests.如果我指定一个文件(比如myAppFile.h)作为myAppTests的一部分而不是myApp,这意味着什么?我的应用程序构建和运行时会发生什么?
谢谢
我有一个使用Kiwi测试框架的iOS项目(我从cocoapods安装的最新版本2.3.0).首先,当我运行测试时,我收到一个错误,它无法找到XCTest.h.所以我按照这个答案的建议:https://stackoverflow.com/a/24651704/1082326,问题就消失了.
但是出现了一个不同的问题,现在当我尝试运行测试时,选择的模拟器是"iPhone 5(8.0)",然后我收到以下错误:
IDEBundleInjection.c: Error 3587 loading bundle
'/Users/ifeins/Library/Developer/Xcode/DerivedData/teacup-
aaenoytmfpqpgmaebqotyfrutlxy/Build/Products/Debug-iphonesimulator/teacup-tests.octest':
The bundle “teacup-tests.octest” couldn’t be loaded because it is damaged or missing
necessary resources.
DevToolsBundleInjection environment:
XCInjectDiagnostics: (null)
XCInjectBundleInto: /Users/ifeins/Library/Developer/Xcode/DerivedData/teacup-
aaenoytmfpqpgmaebqotyfrutlxy/Build/Products/Debug-iphonesimulator/valet.app/valet
XCInjectBundle: /Users/ifeins/Library/Developer/Xcode/DerivedData/teacup-
aaenoytmfpqpgmaebqotyfrutlxy/Build/Products/Debug-iphonesimulator/teacup-tests.octest
TestBundleLocation: /Users/ifeins/Library/Developer/Xcode/DerivedData/teacup-
aaenoytmfpqpgmaebqotyfrutlxy/Build/Products/Debug-iphonesimulator/teacup-tests.octest
TMPDIR: /Users/ifeins/Library/Developer/CoreSimulator/Devices/BC59F7AC-9D3E-4FFC-9726-
97911AA597A6/data/Containers/Data/Application/E1D4A3F0-C06B-485D-BF87-9F5EA70D974A/tmp
DYLD_LIBRARY_PATH: /Users/ifeins/Library/Developer/Xcode/DerivedData/teacup-
aaenoytmfpqpgmaebqotyfrutlxy/Build/Products/Debug-iphonesimulator
DYLD_INSERT_LIBRARIES: /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFra
meworks/IDEBundleInjection.framework/IDEBundleInjection
DYLD_FRAMEWORK_PATH: /Users/ifeins/Library/Developer/Xcode/DerivedData/teacup-
aaenoytmfpqpgmaebqotyfrutlxy/Build/Products/Debug-iphonesimulator
DYLD_FALLBACK_LIBRARY_PATH: /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulat
or8.0.sdk/usr/lib
DYLD_FALLBACK_FRAMEWORK_PATH: /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/Developer/Library/Frameworks
Run Code Online (Sandbox Code Playgroud)
你知道这可能是什么问题吗?
提前谢谢,Ido
我正在使用Xcode在目标C中提供的XCTest处理Xcode中的单元测试.我知道如何在Swift中导入Module,如下所示.
@testable import AppName
Run Code Online (Sandbox Code Playgroud)
什么是客观C的替代方案.
我使用Core Data自动生成的类.除了测试目标,我的项目还有3个目标.对于每个目标,正确生成Core Data类,我通过检查Derived Data文件夹进行验证.但是,尽管在核心数据模型文件中打勾,但不会为测试目标生成类.当我尝试引用测试目标中的一个Core Data类时,这会导致"未声明的标识符"和"使用未声明的类型"错误.我该如何解决这个问题?
ios ×3
objective-c ×3
xcode ×2
build ×1
core-data ×1
frameworks ×1
iphone ×1
kiwi ×1
testing ×1
unit-testing ×1
xcode4 ×1
xcode6 ×1
xcode7.3 ×1
xctest ×1