iOS targets build without error when the base SDK is missing

Originator:douglashill
Number:rdar://18626512 Date Originated:12-Oct-2014
Status:Open Resolved:
Product:iOS SDK Product Version:
Classification: Reproducible:
 
Summary:
If a target specifies an iOS base SDK that can not be found, Xcode builds anyway with no warnings or errors.

This problem does not occur with OS X SDKs, where the build fails if the base SDK can not be found.

The base SDK has a huge effect on the built product. We aim to make the product well defined, and builds repeatable with consistent results. Ideally the built product would be defined entirely by the state of the project’s SCM repository, and not depend at all on the environment — such as the Xcode version. We would prefer builds to fail if the base SDK is missing, rather than succeed and introduce problems not observable until the app is running.

An example use case: a product manager checks out from our stable branch, but is using a more recent version of Xcode than existed when the branch was last modified. The new version of Xcode does not have the SDK specified by the target, but it goes ahead using the latest SDK instead. The product manager observes problems with the app that only exist because the code was written and tested using a different base SDK.

I deliberately changed our base SDK from automatic to explicit; I don’t want it changing back silently.

(Although automatic is a great default for new projects.)

Steps to Reproduce:
1. Create a new project in Xcode 5 using the iOS  Empty Application template.
2. In the target’s Build Settings, explicitly specify the Base SDK as iOS 7.1 (rather than Latest iOS).
3. Open the project in Xcode 6.
4. In the target’s Build Settings, verify that the Base SDK is not found.
5. Build the target.

Expected Results:
Build to fail, with a message that the Base SDK could not be found.

Actual Results:
Build succeeds, presumably using the latest iOS SDK that can be found.

Version:
Tested across Xcode 5.1.1 (5B1008) and Xcode 6.0 (6A313)
OS X 10.9.4 and 10.9.5

Notes:


Configuration:


Attachments:

Comments


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!