On iOS 26.6.2, Live Photos fail to save. This issue does not occur on iOS 27.0 RC.
Devices Experiencing Issues
iPhone 17 (iOS 26.6.2)
iPhone 17 Pro MAX(iOS 26.6.2)
iPad mini 5th generation (iPadOS 26.6.2)
and might be others...
Description
1. For HEVC+MOV, the Livephoto is saved successfully.
If you write the code exactly as shown in the official instruction the Live Photo will be saved successfully.
However, the reference code uses a combination of HEVC and MOV.
let photoSettings = AVCapturePhotoSettings(format: [AVVideoCodecKey: AVVideoCodecType.hevc])
2. For JPEG+MOV, Livephoto saving fails.
Some users prefer JPEG files, which offer high compatibility.
Therefore, we'll modify the code as follows.
let photoSettings = AVCapturePhotoSettings(format: [AVVideoCodecKey: AVVideoCodecType.jpeg])
In this case, the AVFoundation recording process itself succeeds, but
when attempting to save the result to the photo library using PhotoKit, it fails with the following error.
error:The operation couldn’t be completed. (PHPhotosErrorDomain error 3302.)
key: __NSCFString = "_PHResourceUrlsErrorKey"
Here is the code for saving Live Photos. (This is exactly the same as the code in the official reference.)
PHPhotoLibrary.shared().performChanges({
let creationRequest = PHAssetCreationRequest.forAsset()
creationRequest.addResource(with: .photo, data: stillImageData, options: nil)
let options = PHAssetResourceCreationOptions()
options.shouldMoveFile = true
creationRequest.addResource(with: .pairedVideo, fileURL: livePhotoMovieURL, options: options)
}) { success, error in
// Handle completion.
}
We've posted to Apple Feedback with Sysdiagnose. FB24760461
0
0
242