Is there a way to prevent iOS from asking user permission every time my app tries to delete a photo?

Viewed 67

I'm writing an app to help the user organize/clean their photo library in iOS. The problem I'm having is that, even though I have requested and been granted permission to use the photo library, deletions trigger a permission request to the user every time.

The following code:

PHPhotoLibrary.shared().performChanges(
                { PHAssetChangeRequest.deleteAssets([asset] as NSArray) },
                completionHandler: { (success,error) in ...

gives me a popup like this:

enter image description here

Even though I click "Delete", and even though, in Settings, the app has access to the photo library, I get this popup every time the app tries to delete a photo.

Is there a way to avoid this, or will I need to just queue up a list of assets to delete and delete them all in one operation (or will even that ask the user to approve each deletion)?

0 Answers
Related