Selecting the best permissions when creating an album for an app and saving media

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 application, since I will not be loading any images. However, there are two album operations that can only be done under NSPhotoLibraryUsageDescription.

  1. 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.

  2. 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 the NSPhotLibraryUsageDescription 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.

Hi @natsuk4ze,

Apple has asked that questions about their proprietary frameworks, including iOS development using protected resources like the photo library, be asked over at their own developer forums. These forums are meant to be focused on using the Swift programming language itself. That said, someone who's skilled in the topic may be able to give you some pointers on this.

I did not know that. I will ask my question there. Thanks for letting me know @xwu .