iOS image picker is not showing images first time even after granting permission

1.8k views Asked by At

When I fresh install the app and try to add photos even after granting the permission the image picker (I am using QBImagePickerController) can't load any albums or image. But if I terminate the app and relaunch it works. It's happening after iOS 15.2 update. Here is the log while running in simulator.

Failed to load library: Error Domain=com.apple.photos.error Code=41011 "Unauthorized access: client does not have valid TCC authorization" UserInfo={NSLocalizedDescription=Unauthorized access: client does not have valid TCC authorization}


failed to load photo library PHPhotoLibraryMainQueueQoS with url file:///...., Error Domain=com.apple.photos.error Code=41011 "Unauthorized access: client does not have valid TCC authorization" UserInfo={NSLocalizedDescription=Unauthorized access: client does not have valid TCC authorization}

[GatekeeperXPC] Failed to open photo library file://..../data/Media/, Error Domain=com.apple.photos.error Code=41011 "Unauthorized access: client does not have valid TCC authorization" UserInfo={NSLocalizedDescription=Unauthorized access: client does not have valid TCC authorization}
1

There are 1 answers

1
baymak On

If the issue still exist please check below link:https://developer.apple.com/forums/thread/696804

"Before iOS 15.2 version we could register PHPhotoLibrary.shared().register(self) without authorization, in iOS 15.2 it is not possible, you will get an error. You have to request authorization(requestAuthorization(_:)) for register PHPhotoLibrary.shared().register(self)."