PHPhotosErrorDomain Code: 3302 started affecting my users recently.

Recently I received multiple user email supports because the app cannot save video to photos, they are all on iOS 26.x

  1. The code in my app around recording video and saving to Photos hasn't changed in years.
  2. I'm not able to reproduce it locally, I tried on all my available devices.
  3. In recently published build I added additional logs and it appears that all of cases that fail with 3302 have the photos access set to "Limited Access". It never happens to users with "Full Access".
  4. In that build I also added a fallback, when saving to photos fails, the app saves to Documents and it seems it works (two of my users affected users confirmed it), but it's very unfortunate. I think it kind of proves that videos aren't broken given that users are able to play them just fine.

On of users says that for him saving to Photos works for 2-3 times after he reinstalls the app and then it stops working.

Did anything recently changed in how we should save videos to photos?

I'm using the following code. I can see in git blame that I haven't changed in since 2020 and never encountered those errors in development or heard about those issues until around 1 month ago.

Thank you.

PHPhotoLibrary.shared().performChanges {
                PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: fileURL)
            } completionHandler: { success, error in

Thanks for the post and the error. Can you provide the full output of the error? When you debug the app, do you see it in the console?

What the path you are trying to save the image when you get the Error 3302 PHPhotosError.?

What Photos permission do you have? When users grant "Full Access" do you have that error?

If your app only needs to save videos to the Photo Library and doesn't actually need to read the user's existing photos, you should stop requesting Read/Write access and instead request Add-Only access.

Do you have NSPhotoLibraryAddUsageDescription to your Info.plist?

Do you need Read/Write access for other features?

Looking forward to all the information so experts on that that API can help you figure it out. But it seems like a bug to me on the new version?

Albert
  Worldwide Developer Relations.

Hi, as I mentioned I'm not able to reproduce it locally, I tried on all my available devices. so I don't have any error logs.

I have NSPhotoLibraryAddUsageDescription and I reuse the same code in 3 of my production app that are on the marked for 9 and 10 years I never had those complaints until last month.

My app also supports accessing user content (videos from Photos or Documents) they can load videos and reference them side-by-side with the recorded content.

But it seems like a bug to me on the new version?

  1. I don't see anything that I changed. 2. It affects maybe 1% of users, and it works fine for 99% of users just fine. 3. In the analytics it appears there are no users affected by those error with Full Photos access, but I added those analytics just a couple days ago, before I wasn't tracking those errors. 4. I think I should be able to reproduce the error given how many times I already tried.

However until recently I was still using Xcode 16.3 to deploy to AppStore because of supporting older iOS versions and I started using Xcode 26.3. Now that I think about it, maybe this is it? I think it started happening since I switched to Xcode 26.3 from Xcode 16.

Two of my other apps that reuse the recording code and are in production are still deployed using older Xcode versions.

This is what I'm seeing in Crashlytics log.

error_domain: PHPhotosErrorDomain
error_desc: The operation couldn’t be completed. (PHPhotosErrorDomain error 3302.)
error_code: 3302
PHPhotosErrorDomain Code: 3302 started affecting my users recently.
 
 
Q