Detect add photos only

In ios 11, we now have a resolution setting of "Add only photos." ios 11 photos settings

But how do we now determine what level of access to the library library is set? [PHPhotoLibrary authorizationStatus]works only for checking read and write permissions. If the application only asks for "Add Photos" permission, it remains PHAuthorizationStatusNotDetermined. If the user has changed it from "Read and write" to "Add only photos," he gives PHAuthorizationStatusDenied.

So, how can I find out if my application is allowed to perform the Export to Camera function, which does not require read permission?

+4
source share
1 answer

iOS 11, , NSPhotoLibraryAddUsageDescription info.plist. , , . [PHPhotoLibrary authorizationStatus], / ( NSPhotoLibraryUsageDescription info.plist).

, , UIImageWriteToSavedPhotosAlbum (, , , ), , , , , NSPhotoLibraryAddUsageDescription.

, , , NSPhotoLibraryAddUsageDescription, NSPhotoLibraryUsageDescription, info.plist, PHPhotoLibrary, , , UIImageWriteToSavedPhotosAlbum.

, UIImageWriteToSavedPhotosAlbum, , , , .

+1

Source: https://habr.com/ru/post/1686122/


All Articles