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 version? 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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top