gpt4 book ai didi

ios - 可以同时请求权限吗?

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:08:38 24 4
gpt4 key购买 nike

在我的应用程序中,我们有一些应用程序运行所绝对需要的权限,对于这些权限,我们设置了界面向用户解释为什么需要它们,然后要求用户授予权限。

但是,要求某些权限似乎有点多余,例如“照片”和“相机”。是否可以(在 iOS 8+ 中)同时请求两个权限?我不记得曾经授予应用程序访问我的照片库相机的权限,但它似乎是我的应用程序中所必需的。

目前我正在连续请求权限,但是多个弹出框比任何东西都更烦人,尤其是在感觉没有必要的时候。

最佳答案

虽然 Camera 和 Photos 似乎应该作为一个权限集中在一起,但它们都使用两个不同的框架(AVCaptureDevice 和 PHPhotoLibrary),因此有两个单独的授权要求(即使您使用的是 UIImagePickerController)。

我建议您尝试利用这个机会让它成为一种请求授权并向您的用户解释其必要性的体验。

有很多文章 ( here's one ),一些设计师在工作中,至少在我的工作中,当你花一些时间向用户解释为什么需要访问时,他们会赞扬你如何获得更好的接受率。

还有 Apple Human Interface Guidelines有一个关于访问用户数据以及您应该如何处理它的页面

Make sure users understand why they’re being asked to share their personal data. It’s natural for people to be suspicious of a request for their personal information if they don’t see an obvious need for it. To avoid making users uncomfortable, make sure the alert appears only when they attempt to use a feature that clearly needs to know their information. For example, people can use Maps when Location Services is off, but they see an alert when they access the feature that finds and tracks their current location.

Describe why your app needs the information, if it’s not obvious. You can provide text that appears in the alert, below a system-provided title such as ““App Name” Would Like to Access Your Contacts” or for location notifications, “Allow “App Name” to Use Your Location While You Use the App?”. You want this text to be specific and polite so that people understand why you’re asking for access to their information and don’t feel pressured.

关于ios - 可以同时请求权限吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35051797/

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