I'm removing some pictures from iOS camera roll using PHPhotoLibrary. Here's the code snippet I use:
PHPhotoLibrary *library = [PHPhotoLibrary sharedPhotoLibrary];
[library performChanges:^{
PHFetchResult* assetResult = [PHAsset fetchAssetsWithLocalIdentifiers:assets options:nil];
[PHAssetChangeRequest deleteAssets:assetResult];
} completionHandler:^(BOOL success, NSError *error) {
if (error != nil) {
NSLog(@"error: %ld", (long)error.code);
}
}];Where assets is an array of local uuids. The completionHandler can contain an error object, but I can't find a list of known errors.
For example, executing this code will ask the user for a confirmation and if the user cancel it the error will be -1 but I can't find any official source that states this.
Is there even an unofficial list? Any of you have practical experience with it?