Xcode Ignores SDKROOT when set via xcconfig files

Originator:davidmorford
Number:rdar://8192536 Date Originated:July 14, 2010
Status:Open Resolved:Closed
Product:Xcode Product Version:3.2.3
Classification:Other Bug Reproducible:Always
 
Summary:

When the SDKROOT value for an Xcode project is set via an .xcconfig file, that value is ignored by Xcode and affects the display of Overview bar, removes the device and simulator targets and and eliminates SDK selection. This last issue I do understand a *probable* reason where it not for the recommendation to still use iOS 3.2 SDK for iPad only apps. The only fix I've found so far is to *hard code* the SDKROOT value at the project level in the.pbxproj file. 

What happens here is that management of source project trees, that properly use xcconfig files and multi-layer build settings, is made more difficult. While build scripts using xcodebuild to specify the base SDK operate correct on the projects with the xcconfig files, it means MANUALLY changing the Base SDK of static library projects instead of selecting a different SDK.

I believe the release notes on the modification of this feature was... "iPhone developers found it confusing.". This is one long time Mac and iOS developer that did not find it confusing at all.

Steps to Reproduce:

1. Create Xcode project and remove ANY settings of SDKROOT in the .pbxproj file at the project and target
2. Add an .xconfig and set the SDKROOT to iphoneos3.2.
3. Reopen project and see that simulator and device are missing from Overview menu.

Expected Results:

That Xcode respects the SDKROOT setting in xcconfig files

Notes From Engineering (AFTER iOS 4.2 introduced iphoneos as symbol for the latest SDK.)

14-Dec-2010 03:40 PM Patrick Collins :
Engineering has provided the following feedback regarding this issue:

This is working for us on iOS 4.2.1. However, you will have to close and reopen the project after telling the project to use the config file to build the overview popup correctly. This is a known issue that is being tracked by another bug report.

Comments

This bit me as well, wasting a good afternoon trying to work out why I could no longer install on device. Have duped as rdar://8338958 .

By andy.warwick at Aug. 21, 2010, 4:10 p.m. (reply...)

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!