If I were to compile an application for OS X 10.x to submit to the App Store, would it be allowed for me to use -respondsToSelector, NSClassFromString()
, etc. in order to conditionally use new APIs that are present in newer versions of Mac OS X while still compiling for an older versi开发者_开发知识库on? Or would that be considered private API use?
Provided you're not linking against a beta version of the OS then what you have described is a perfectly valid pratice.
Obviously you'll want to compile against the latest version of the SDK, but you will also have to set your deployment target SDK to be the oldest version that you wish to support.
精彩评论