gpt4 book ai didi

ios - 使用 Info.plist 中的 UIRequiredDeviceCapabilities 限制兼容设备

转载 作者:行者123 更新时间:2023-11-28 18:47:45 60 4
gpt4 key购买 nike

如果我只希望我的应用程序在某些 iPhone/iPad 型号上运行,是否可以指定我的应用程序需要 ARKit 来实现这一点,即使我的应用程序实际上没有使用 ARKit 中的任何东西?

还有其他方法可以解决这个问题吗?此外,即使进行了此更改,我的应用程序仍会为它不喜欢 iPhone 5s 模拟器的设备构建。设备限制是否仅在应用商店发生变化?

最佳答案

  1. UIRequiredDeviceCapabilities 可让您声明应用运行所需的硬件或特定功能。

  2. UIRequiredDeviceCapabilities 可以用作 Info.plist 中的字典,功能作为键,其值为 YES/NO。

  3. 它似乎对模拟器没有任何影响,但在设备上运行时它虽然编译但显示提示并且不运行: enter image description here

  4. 看起来您可以使用某种功能来限制设备,即使您实际上并未在任何地方的代码中使用该功能。

  5. Apple 提到了 here AppStore 使用此 key 来阻止用户安装该应用。

  6. 此外,我们不能使用此 key 来限制更新中的任何设备。看起来任何预期的限制都需要包含在第一个应用程序版本中:

Important: All device requirement changes must be made when you submit an update to your binary. You are permitted only to expand your device requirements. Submitting an update to your binary to restrict your device requirements is not permitted. You are unable to restrict device requirements because this action will keep customers who have previously downloaded your app from running new updates.

编辑:

  1. 设备功能限制似乎有效,即使该特定功能不适用于 iOS 版本。为了对此进行测试,我将部署目标设置为 iOS 9.3,并在装有 iOS 10.3.3 版本的 iPhone 6 设备上进行了测试。它仍然向我显示弹出窗口。此处,arkit 和 nfc 可用于 iOS 11 及更高版本。

enter image description here

引用资料:
https://developer.apple.com/library/content/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/DeviceCompatibilityMatrix/DeviceCompatibilityMatrix.html

https://developer.apple.com/library/content/qa/qa1397/_index.html

关于ios - 使用 Info.plist 中的 UIRequiredDeviceCapabilities 限制兼容设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48285965/

60 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com