ios - Swift - 你如何决定你的 iOS 应用程序的最佳 "Deployment Target"

标签 ios xcode swift

在 Xcode 上,您可以自行决定“部署目标”,但您可能会选择太旧的版本来稳定运行应用程序,因为您的代码中的某些方法已被更高版本的 iOS 支持。 (例如选择 Deployment Target 8.0,但是当你在 iOS 8.0 版本的设备上运行应用程序时,应用程序会崩溃)

有没有什么好的方法来决定最佳的Deployment Target,或者有什么工具可以扫描整个代码来了解iOS的最低版本?

最佳答案

这实际上是 Xcode 7Swift 2.0 的一个新特性,参见 swift 网站:

Swift Apple

在网站上,Availability

Swift 2.0 has built-in availability checking to make it easy to build the best possible app for each target OS version. The compiler will give you an error when using an API too new for your minimum target OS

关于ios - Swift - 你如何决定你的 iOS 应用程序的最佳 "Deployment Target",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31720554/

相关文章:

ios - "npx cap add ios"失败,错误 "Updating iOS native dependencies with pod install - failed!"

objective-c - xcode 5 问题 : "iOS Simulator failed to install the application"

iphone - 如何在iPhone应用程序中将搜索索引添加到sqlite数据库

objective-c - 不要播放声音

objective-c - 从 Swift 传递回调函数调用 Objective C 和 C

swift - Swift 中的泛型和函数式编程

ios - 运行时 - 这个 "@@:"在 class_addMethod 中意味着什么?

iOS 用户界面 : Need guidance to design such a flow of screens - which controllers should be best?

iOS - Swift - 比较 2 个实体的值

ios - AVPlayer 状态总是 AVPlayerStatusReadyToPlay