Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例如,iOS Deployment Target我的 Xcode 项目之一中的值为 iOS 4.3。如何从代码中读取该值?
iOS Deployment Target
我不确定这是否会返回部署(即最小)版本或构建 SDK 版本,但<Availability.h>头文件中有宏,您可以使用它们编写类似的东西
<Availability.h>
if (__IPHONE_OS_MIN_VERSION_REQUIRED == 4.3) { // Code available in iOS 4.3 or later only }
等等