A scheme whose target target has dependencies on another platform shouldn't "support" that platform

Number:rdar://24247701 Date Originated:19-Jan-2016 06:34 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Version 7.3 beta (7D111g)
Classification:UI/Usability Reproducible:Always
A scheme for a given platform, e.g. an iOS app supporting iOS and iOS Simulator platforms, will be deduced to also support the OS X platform if any dependency of any target in the scheme targets the OS X platform.

This is a nuisance because, for example, the nonsensical support for the wrong platform may cause xcodebuild to default to that platform at build time, leading to unpredictable and difficult to diagnose build errors.

Because OS X is the platform on which Xcode runs, it's not uncommon for a target of sufficient complexity to list among its dependency tree some target that is e.g. a helper tool, itself used in the derivation of source or data for the iOS-platform targeted product. The mere presence of this helper tool in the dependency tree (it might even be nested many levels deep) should not be sufficient to flag the top level scheme as supporting OS X as a platform target.

At best it's a nuisance because it shows the nonsensical platform target among the platforms to be selected in Xcode's UI. At worst it presents unpredictable behavior when xcodebuild is invoked for the scheme without explicitly specifying a destination for the intended platform.

Steps to Reproduce:
1. Open attached sample project, consisting of a single iOS app target with a dependency on a fictional Mac build tool.
2. Click the Scheme popup in Xcode's toolbar, and select "iOSApp" to see its supported targets.

Expected Results:
"My Mac" should not be listed among the supported targets for this scheme. Although a dependency does build for Mac, it doesn't imply the scheme, whose only target is for iOS, does.

Actual Results:
My Mac is listed as a supported target. However if you select and build for the platform it builds (I guess due to some fallback behavior with respect to platforms), but of course cannot be run.

Version 7.3 beta (7D111g)



'iOSApp.zip' was successfully uploaded.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!