Our command used to be like this
xcodebuild -configuration Release -target "xxx" -sdk iphoneos9.0 -scheme "xxx" archive
Now in Xcode 7, we get this error:
Build settings from command line:
SDKROOT = iphoneos9.0
=== BUILD TARGET xxx WatchKit Extension OF PROJECT Mobile WITH CONFIGURATION Release ===
Check dependencies
target specifies product type 'com.apple.product-type.watchkit2-extension', but there's no such product type for the 'iphoneos' platform
How do we specify to use iOS 9.0 SDK and the watchos 2.0 SDK?
If you need a simulator build run this:
And if you need a device build run this:
The trick is that for any build you need to remove
-sdk
option. For simulator build you need to specify-destination
which should beiPhone 6
oriPhone 6 Plus
. And for devices builds you skip-destination
.