I'm running iOS simulator unit tests on the command line using xctest
. First I build the target:
xcodebuild -project "build/MyApp.xcodeproj" -target "MyApp Unit Tests" -configuration "Debug" -sdk "iphonesimulator" build
And then run xctest
on the test bundle:
xcrun xctest "build/build/Debug-iphonesimulator/MyApp Unit Tests.xctest"
This works fine, and can link frameworks that are in /System/Library/Frameworks like Security. But xctest
breaks as soon as I add an iOS SDK framework like MobileCoreServices, giving me:
Library not loaded: /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices
The unit tests run fine in Xcode, and the unit test target includes $(PLATFORM_DIR)/Developer/Library/Frameworks
in its Frameworks Search Paths.
Anybody know the right way to make xctest
find iOS frameworks?