PHPhotoLibrary requestAuthorization handler not invoked

PHPhotoLibarary.requestAuthorization(for accessLevel: PHAccessLevel, handler: @escaping (PHAuthorizationStatus) -> Void) does not invoke the completion handler.

If the user selects limited photos, the handler is not called. Furthermore the limited library picker is presented for about a second then it disappears.

I already have the following in the info plist

	<string>Photo Library access is needed to import saved photos</string>
	<true/>
       let stat = PHPhotoLibrary.authorizationStatus(for: .readWrite)
      print("Photolibrary settign: current status: \(stat)")
       
      PHPhotoLibrary.requestAuthorization(for: .readWrite) { status in
        switch status {
        case .restricted:
          print("Photolibrary settign: restricted")
        case .denied:
          print("Photolibrary settign: denied")

        case .limited:
          print("Photolibrary settign: limited")

        case .authorized:
          print("Photolibrary settign: authorized")

        case .notDetermined:
          print("Photolibrary settign: not determined")
        default:
          break

        }
      }