Can't load photos anymore
Hi,
I've encountered the following issue since updating to iOS 18 (worked fine on iOS 17): the camera roll opens, the photo is selected (and I can see it when downloading the container from my device), but I can't load any image (can't display them in my application).
Probably has to do with the newly introduced iOS feature “Private Access to Photo”?
Debug from Xcode console prints: AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver'
I use the NativeGallery.GetImageFromGallery() method.
- Unity version: 2023.2.7f1
- Platform: Sonoma 14.5
- Device: iOS 18.1
- How did you download the plugin: Package Manager (v1.8.0)
Hi, are you loading images with NativeGallery.LoadImageAtPath? Is this issue reproducible for all images in your Photos (including photos existing on phone's disk)?
Thanks for the quick reply, yes, I'm using NativeGallery.LoadImageAtPath, and the issue is for all images including in local.
That's sad to hear. I think "Private Access to Photo" is the iOS 14 privacy change, just relabeled.
I'll google the error message but usually they don't lead to anywhere so I'm pessimistic. If you find anything new, please let me know. I'd recommend logging the outputs of GetImageFromGallery and LoadImageAtPath. It'd help to know which stage it fails at. You can also try the following:
- Download a png image to temporaryCachePath via UnityWebRequest
- Try loading it via NativeGallery.LoadImageAtPath
- Try loading it via Unity's Texture2D.LoadImage
I see thanks. Printing permission shows “Granted” and image path is correct from NativeGallery.Permission permission = NativeGallery.GetImageFromGallery((path) =>{…} but same Ax Lookup problem.
I've googled the error message but the results weren't related to Photos unfortunately (do let me know if you find different results). Can you test the other things I've mentioned when you get the chance?
PS. I recommend doing these tests on a clean Unity project.