PHAssetCreationRequest merges new Burst Photos into "Recently Deleted" instead of Library

Description

I am observing a critical issue when saving burst photos using the Photos Framework. If a burst photo with the same burstIdentifier already exists in the "Recently Deleted" album, any new assets saved via PHAssetCreationRequest are automatically merged into that deleted entry instead of appearing in the main Library or "All Photos."

Environment

  • Framework: Photos Framework (iOS)
  • API: [[PHPhotoLibrary sharedPhotoLibrary] performChanges:...]

Code Snippet

The following logic is used to save the burst assets:

[[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{
    // 'paths' is a custom object providing the creation request
    PHAssetCreationRequest *assetCreationRqst = [paths assetCreationRqst];
    assetCreationRqst.favorite = [FavorManager.shared isSetDownloadedAssetFavorite:self.curItem];
    
    PHObjectPlaceholder *placeHolder = assetCreationRqst.placeholderForCreatedAsset;
    localIdentifier = placeHolder.localIdentifier;
    
} completionHandler:^(BOOL success, NSError * _Nullable error) {
    if (success) {
        // The handler returns success, but the asset is invisible to the user
        [weakSelf handleDownloadSuccess:localIdentifier];
    }
    // ... cleanup and completion ...
}]; 

Steps to Reproduce

  • Save a burst photo to the iPhone's built-in Photos app.

  • Manually delete that burst photo so it moves to the "Recently Deleted" album.

  • Execute the code above to save the same burst photo (or a new set containing the same burstIdentifier in its metadata).

  • Check the main Photo Library / "All Photos" view.

Observed Result

  • The completionHandler returns success = YES, and a localIdentifier is generated.

  • The photo does not appear in the main Library or "All Photos."

  • The newly saved photo is silently merged into the existing burst set located inside the "Recently Deleted" folder.

  • The user cannot see the new photo unless they manually "Restore" the deleted items from the album.

Expected Behavior

PHAssetCreationRequest should always result in a visible asset in the user's Library. Even if a matching burstIdentifier exists in "Recently Deleted," the system should treat the new request as a new independent asset or provide an error, rather than hiding it within a deleted collection.

Hello jimmy520,

The behavior you're describing is intentional. As per the documentation for burstIdentifier:

When the user takes a sequence of photos in burst mode with the Camera app (on supported devices), the Photos app user interface groups the resulting assets together. The Photos framework identifies a burst sequence as a group of assets sharing the same burst identifier string.

As such, attempts to save or import an image with a duplicate burstIdentifier will result in the image being sent to the same place as the rest of the group.

A workaround to the situation you're describing is to delete the original burst photo with the burstIdentifier from Recently Deleted. So when you either re-save it, or create a new photo with that identifier, it will be treated as the beginning of a new group.

Let me know if you'd like to know more,

Richard Yeh  Developer Technical Support

PHAssetCreationRequest merges new Burst Photos into "Recently Deleted" instead of Library
 
 
Q