xcode7 - How to use xcodebuild in Xcode 7 with a watch extension -


our command used this

xcodebuild -configuration release -target "xxx" -sdk iphoneos9.0 -scheme "xxx" archive 

now in xcode 7, error:

build settings command line:     sdkroot = iphoneos9.0  === build target xxx watchkit extension of project mobile configuration release ===  check dependencies target specifies product type 'com.apple.product-type.watchkit2-extension', there's no such product type 'iphoneos' platform 

how specify use ios 9.0 sdk , watchos 2.0 sdk?

if need simulator build run this:

xcodebuild -workspace workspacename.xcworkspace -scheme schemewithwatchos2target -destination 'name=iphone 6' build 

and if need device build run this:

xcodebuild -workspace workspacename.xcworkspace -scheme schemewithwatchos2target build 

the trick build need remove -sdk option. simulator build need specify -destination should iphone 6 or iphone 6 plus. , devices builds skip -destination.


Comments