4

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}
Rashad
  • 11,057
  • 4
  • 45
  • 73

1 Answers1

1

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)."

baymak
  • 89
  • 9
  • This should be marked as the answer. Call PHPhotoLibrary.shared().register(self) after receiving status from authorization(requestAuthorization(_:)) – palusik Jan 20 '22 at 13:27