0

I am getting this error after choosig image from gallery in ios app errors encountered while discovering extensions: Error Domain=PlugInKit Code=13 "query cancelled" UserInfo={NSLocalizedDescription=query cancelled}

I have also added- Privacy- Photo Library photo description, camera description.

Also tried- OS_ACTIVITY_MODE disable

but still unable to fix

Ravi
  • 9
  • 4
  • Code is required while asking question , also add your attempts to fix issue – Prashant Tukadiya Jul 06 '18 at 09:25
  • -(void)selectImage { UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.delegate = self; picker.allowsEditing = YES; picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; [self presentViewController:picker animated:YES completion:NULL]; } //uploading image from gallery but after chosing image and click on choose,getting above error – Ravi Jul 06 '18 at 09:31
  • I found this :https://stackoverflow.com/questions/44465904/photopicker-discovery-error-error-domain-pluginkit-code-13 – Tung Vu Duc Jul 06 '18 at 10:22

1 Answers1

0

I am not sure what code you are using but one of the problems might be that you are not properly handling all the authorisation cases.

func performPermissionCheck() {
    let authorisationStatus = PHPhotoLibrary.authorizationStatus() 

    switch authorisationStatus {
        case .authorized: 
             print("Access granted")
        case .notDetermined: 
             PHPhotoLibrary.requestAuthorization({ newStatus in 
              if newStatus == PHAuthorizationStatus.authorized { 
                  print("success")}
            })
        case .restricted: 
             print("No access to album")
        case .denied: 
             print("Permission Denied")
   }
}
ODev99
  • 34
  • 3