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.
我目前正在使用 Xcode 7.5 beta 和 Swift 2 进行开发。我选择让我的项目在所有 iPhone 上运行。但是,我不想在 iPhone 4s 上运行它,因为屏幕尺寸太小了。无论如何我只能在 iPhone 5 - 6s 上运行它吗?
您可以使用信息属性列表 (Info.plist) 文件限制哪些 iPhone 可以运行您的应用程序。“UIRequiredDeviceCapabilities 键允许您声明应用程序运行所需的硬件或特定功能”但是,这是基于手机功能而不是特征。它不会让您通过屏幕尺寸来限制适用性,但您可以通过在您的目标手机中找到您想要排除的硬件不共享的通用功能来获得类似的结果。
使用下面链接的设备兼容性矩阵。虽然我不确定如何排除 4s,但在不排除 4 的情况下,有几个选项可以排除 5S 之前的所有 iPhone。
祝你好运!
https://developer.apple.com/library/prerelease/ios/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/DeviceCompatibilityMatrix/DeviceCompatibilityMatrix.html#//apple_ref/doc/uid/TP40013599-CH17-SW1