iOS 上的代码路径

发布于 2024-09-24 00:44:18 字数 336 浏览 2 评论 0原文

我们有一个使用网络、指南针、相机和电话的应用程序。它已被拒绝,因为我们没有在 UIRequiredDeviceCapability 中指定需要或禁止的密钥。这是我们几个月前上传的应用程序的新版本,之前没有任何问题。

文档上说

您应该仅包含以下密钥 您的应用程序的功能 绝对需要。如果你的 申请可以容纳缺失的 通过不执行功能 适当的代码路径,你不 需要包含相应的key。需要包含相应的key。

如何在我的应用程序上创建“代码路径”?它是指条件编译(#ifdef __IPHONE_3_X)还是在运行时检查设备特性并执行不同的代码?

We have an app that uses network, compass, camera and telephony. It has been rejected because we don't specify in UIRequiredDeviceCapabilities the keys that are requiered or prohibited. This is a newer version of an app that we upload months ago and we don't had any problem before.

On documentation says

You should include keys only for the
features that your application
absolutely requires. If your
application can accommodate missing
features by not executing the
appropriate code paths, you do not
need to include the corresponding key.need to include the corresponding key.

How can I make "code paths" on my app? It refers to conditional compilation (#ifdef __IPHONE_3_X) or checking the device features on runtime and executing different code?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

╰沐子 2024-10-01 00:44:18

您的应用程序如何运作?您需要指南针还是使用指南针可以更好地发挥作用?相机、电话等也是如此。如果您的应用没有这些功能就无法运行,那么您需要将它们列在 UIRequiredDeviceCapability 中。

我认为您不需要更改任何代码,只需更新您的 Info.plist 即可。

How does your app work? Do you need the compass or does it just work better with it? Same for the camera, telephony, etc. If your app will not work without those features then you need to list them in UIRequiredDeviceCapabilities.

I don't think you need to change any code, you just need to update your Info.plist.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文