I am trying to create an album for an app in photo_kit and store images in it, is there any way to do this under the NSPhotoLibraryAddUsageDescription
permission?
At first glance, using NSPhotoLibraryAddUsageDescription
seems to be the best choice for this app, since I will not be loading any images. However, there are two album operations that can only be done under NSPhotoLibraryUsageDescription
.
-
Creating an album
Even though the creation of an album does not involve loading media, it is necessary to use
NSPhotoLibraryUsageDescription
to allow users to load media. This is a bit unconvincing. -
Saving images in the created album
Before saving, you must check to see if the app has already created the album. You need to fetch the name as a key. This is where
NSPhotLibraryUsageDescription
is needed. I understand that theNSPhotLibraryUsageDescription
is needed for fetching, but if iOS forbids the creation of albums with the same name and ignores attempts to create an album with an already existing name, this fetching will not be necessary.
In summary, I just want to create an album for my app and store media in it, but in order to do so I need to get permission from the user to read into the photos, which goes against the idea that the permissions I request should be minimal and only what I need. If there is a way to do this under the NSPhotoLibraryAddUsageDescription
permission I would like to know, I am new to Swift so sorry if I am wrong.