简体   繁体   English

使用 PHPickerViewController 和 UIImagePickerController 是否需要请求权限?

[英]Is request permission require for using PHPickerViewController & UIImagePickerController?

I have some confusion about permission with using PHPickerViewController & UIImagePickerController .我对使用PHPickerViewControllerUIImagePickerController的权限有些困惑。

Do I have to request permission for using it?我必须请求许可才能使用它吗? (Currently, I open it without request permission but It's working.) (目前,我在未经请求许可的情况下打开它,但它正在工作。)

Is it acceptable for upload to app store?上传到应用商店是否可以接受? and if it acceptable when I have to request permission for photo?当我必须请求照片许可时是否可以接受?

Ps.附言。 I use PHPickerViewController for iOS14+ and UIImagePickerController for <iOS13.我为 iOS14+ 使用PHPickerViewController ,为 <iOS13 使用UIImagePickerController Thank you for every reply or answer.感谢您的每一个回复或回答。

First you need to know is, according to Apple's docs首先你需要知道的是,根据Apple 的文档

The PHPickerViewController class is an alternative to UIImagePickerController . PHPickerViewController class 是UIImagePickerController的替代品。 PHPickerViewController improves stability and reliability, and includes several benefits to developers and users PHPickerViewController提高了稳定性和可靠性,并为开发人员和用户带来了一些好处

So both PHPickerViewController and UIImagePickerController are just the same with new upgrade.所以PHPickerViewControllerUIImagePickerController都与新升级相同。

As default, it runs in a separate process and on read-only access you don't need any special permissions for that.默认情况下,它在一个单独的进程中运行,并且在只读访问时你不需要任何特殊权限。

And of course if you need some advance features , like retrieving assets and collections, or updating the library from your apps you must have permission for it.当然,如果您需要一些高级功能,例如检索资产和 collections,或者从您的应用程序更新库,您必须拥有它的权限。

You can read more from this link for permission to access some feature if need.如果需要,您可以从此链接阅读更多内容以获得访问某些功能的权限。

PHPicker provides a better privacy and does not require to ask for user consent so it can be used. PHPicker 提供更好的隐私,不需要征得用户同意就可以使用。 Even though an app can trigger its presentation, the picker runs in a separate process where users can select only type of media necessary for their tasks, and do nothing beyond that;即使一个应用程序可以触发它的呈现,选择器在一个单独的进程中运行,用户可以 select 只有他们的任务所需的媒体类型,除此之外什么都不做; not even to get a snapshot of the picker.甚至没有得到选择器的快照。 So, with PHPicker, simply forget about usage descriptions and rely on the built-in iOS privacy.因此,使用 PHPicker,只需忘记使用说明并依赖内置的 iOS 隐私。

And if you want to explicitly allow user to select limited photos then you can implement it using the same.如果你想明确允许用户使用 select 有限的照片,那么你可以使用相同的方式实现它。

Yes there is no problem to upload it to the app store.是的,上传到应用商店没有问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 UIImagePickerController 前检查权限 - Checking permission before using UIImagePickerController PHPickerViewController 添加视频编辑屏幕 aka (UIImagePickerController.allowsEditing = true) - PHPickerViewController add video editing screen aka (UIImagePickerController.allowsEditing = true) 当用户尝试使用具有选定照片权限的 PHPickerViewController 在 IOS 14、swift 5 中检索视频时,获取视频数据为零 - Getting video data nil when user tries to retrieve video using PHPickerViewController with selected photos permission in IOS 14, swift 5 UIImagePickerController 不请求许可 - UIImagePickerController not asking for permission UIImagePickerController不问权限? - UIImagePickerController not ask permission? 使用`PHPickerViewController`选择视频时是否可以限制视频时长? - Is it possible to limit the video duration when selecting a video using `PHPickerViewController`? 使用 PHPickerViewController 导入图像时出现 PHAssetExportRequestErrorDomain 错误 0 和 2 - Getting a PHAssetExportRequestErrorDomain error 0 and 2 when importing an image using a PHPickerViewController 在iOS 9.3.3中使用UIImagePickerController访问摄像头时避免显示两个权限警报 - Avoid showing two permission alerts when accessing camera using UIImagePickerController in iOS 9.3.3 UIImagePickerController也没有在第一次使用时请求权限 - UIImagePickerController is not asking for permission on first use too 将 UIImagePickerController 与 UICollectionView 一起使用 - Using UIImagePickerController with a UICollectionView
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM