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

标签 ios

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

但是,要求某些权限似乎有点多余,例如“照片”和“相机”。是否可以(在 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/

相关文章:

iphone - 如何(以编程方式)判断是否有/没有任何支持打开特定文档类型的注册应用程序?

ios - 将数据转换为 bool 值

objective-c - 如何隐藏表索引和表?

ios - UITableViewCell 原型(prototype)中的 UIScrollView 仅在重用后才滚动

iphone - 在横向模式下制作 iOS 应用程序

iphone - UIDatePicker 上下限

ios - 如何在用户返回主屏幕后每次重新启动 iOS 应用程序?

php - AES256 从 iOS 到 PHP

ios - Firebase 迁移是否需要修改任何源代码?

ios - 将 Google AdMob SDK 从 7.7.0 更新到 7.8.0 undefined symbol 错误