I run tests on the iOS simulator module on the command line using xctest . First I create a goal:
xcodebuild -project "build/MyApp.xcodeproj" -target "MyApp Unit Tests" -configuration "Debug" -sdk "iphonesimulator" build
And then run xctest in the test suite:
xcrun xctest "build/build/Debug-iphonesimulator/MyApp Unit Tests.xctest"
This works great and can bind frameworks that are located in / System / Library / Frameworks, for example Security. But xctest breaks as soon as I add the iOS SDK infrastructure like MobileCoreServices, providing me with:
Library not loaded: /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices
Unit tests run fine in Xcode, and the unit test target includes $(PLATFORM_DIR)/Developer/Library/Frameworks in the Framework search path.
Does anyone know the right way to do xctest find iOS frameworks?
ios unit-testing xcode xcrun xctest
Luke
source share