We hit exactly this on iOS 18.6 (iPhone 15 Pro), and for us the trigger turned out to be very specific — maybe it helps narrow down the affected devices.
deleteAssets never presents the confirmation and never calls the completion handler, and afterwards every change request in that process — including PHAssetCreationRequest for new captures — is stuck behind it until the app is relaunched. Our users reported it as "deleting a photo stops the camera from saving anything".
The assets that wedge are 48 MP Apple ProRAW frames our camera saved WITHOUT an embedded JPEG preview. On the same device and the same library, deleting HEIC assets, or ProRAW assets that do carry a preview, presents the dialog instantly.
The fix on our side was to request the embedded preview at capture time:
if settings.availableRawEmbeddedThumbnailPhotoCodecTypes.contains(.jpeg) {
settings.rawEmbeddedThumbnailPhotoFormat = [
AVVideoCodecKey: AVVideoCodecType.jpeg,
AVVideoWidthKey: 4032,
AVVideoHeightKey: 3024,
]
}
Two caveats worth knowing:
Do not request the preview at full sensor resolution (8064x6048): on 18.6 that silently drops the whole capture to 12 MP (rawPhotoDimensions comes back 4032x3024, no error anywhere).
Assets already saved without a preview stay undeletable from third-party apps. They can still be removed from within the Photos app.
Even with the workaround this looks like a bug worth fixing: a missing preview should not deadlock the deletion path. The API should present the dialog, however slowly, or fail with an error — not hang forever and block every later library change in the process.
Filed as FB24503330, with a minimal sample project attached (one Swift file, plain AVCapturePhotoOutput + PhotoKit, no dependencies) that captures a frame in a chosen combination, saves it, and deletes it — it reproduces the hang on demand.
Topic:
Media Technologies
SubTopic:
Photos & Camera
Tags: