I had a code to request authorization that worked perfectly on iOS <= 13. When iOS 14 launched, PHPhotoLibrary.requestAutorization with Selected Photos stopped triggering the handler
PHPhotoLibrary.requestAuthorization { status in
if status == .authorized {
DispatchQueue.main.async {
Now the completion is not being called when the user selects Selected Photos. It starts working only after app restart, and more than that, it does not show limited library picker when it does work, so I have to call PHPhotoLibrary.shared().presentLimitedLibraryPicker manualy
I tried doing it the new way with
if #available(iOS 14, *) {
PHPhotoLibrary.requestAuthorization(for: .readWrite) { status in
switch status {
case .authorized:
...
case .limited:
but it doesn't get called here either
I've been battling with this issue for days now, what could be the problem here? I have a feeling that something might be obstructing the views being called, but this code is being called with a press of a UIButton on a UIViewController inside a UITabBarViewController, so I have no idea.