LockedCameraCaptureExtension can not get access to photo library

I've requested the authentication in my main app.

PHPhotoLibrary.requestAuthorization(for: .readWrite) { status in }

Add the privacy description in both the main app and the extension. But No matter the device is locked or unlocked. When I call

let fetchResult = PHAsset.fetchAssets(with: .image, options: nil)
let count = fetchResult.count

the count is always zero, even after a new photo is saved to the album in the same session.

Are you able to read and/or write assets from your main app? Are there any error logs along the lines of access being denied that you are seeing?

If you attach a sample project to a feedback or a diagnostics where you are reproducing the issue that would help us to determine what is going wrong.

LockedCameraCaptureExtension can not get access to photo library
 
 
Q