Detect unsupported SDK calls

Originator:futuretap
Number:rdar://12017796 Date Originated:02-Aug-2012 08:00 PM
Status:Duplicate/7184689/Open Resolved:
Product:Developer Tools Product Version:4.5
Classification:Other Bug Reproducible:Not Applicable
 
Apple's advice for supporting older versions of the SDK is to set the deployment target, but link to the latest SDK. This is very dangerous in practice because if your program makes a call to a function that is not supported in your deployment target, you will get no warning, but it will crash at runtime. Neither the compiler nor the static analyzer will help protect you from this.

Apple's advice here is not useful, and developers in practice must link against the old SDK in order to avoid crashing.

Apple should provide a tool to detect SDK usage that is not compatible with the deployment target (including filtering out correct usage via weak linking, as Apple recommends). Until Apple can provide such a tool, Apple should stop removing old SDKs from Xcode.

Dupe of http://openradar.appspot.com/11985733

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!