Can't create an album with the same name as the deleted one in iOS?

I use the ALAssetsLibrary + CustomPhotoAlbum category to save the image to a custom name album.

I recently encountered this problem: if I have an album (for example: myAlbum) in the library, after I deleted it ALAssetsLibrary+CustomPhotoAlbum , it is not possible to create an album with the same name.

After debugging, I found out that the call

 [ALAssestLibrary addAssetsGroupAlbumWithName:resultBlock:failureBlock] 

returns successfully (resultBlock is called). But the album was not created.

Does anyone have the same problem?

+6
source share
1 answer

I know that my answer is very late, but in case someone encounters the same problem as me. The problem arises with me in iOS 8.0 or later, and the solution is to use Photos.framework . Use the updated Github category and remember to import Photos.framework .

+7
source

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


All Articles