Ios XCode 9.0:错误域=PlugInKit代码=13“;查询已取消";允许权限后出错

Ios XCode 9.0:错误域=PlugInKit代码=13“;查询已取消";允许权限后出错,ios,objective-c,uiimagepickercontroller,info.plist,Ios,Objective C,Uiimagepickercontroller,Info.plist,更新Xcode后,在模拟器上运行我的应用程序时,我遇到了这个错误。我查看了其他与此错误相关的SO问题,它们都与权限有关。但即使包含了请求权限的代码,并确保我的Info.plist中有Photo Library Usage,我仍然会收到错误 - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; [PHPhotoLibrary requestAuthorization:^(PHAuthori

更新Xcode后,在模拟器上运行我的应用程序时,我遇到了这个错误。我查看了其他与此错误相关的SO问题,它们都与权限有关。但即使包含了请求权限的代码,并确保我的
Info.plist
中有
Photo Library Usage
,我仍然会收到错误

- (void)viewDidAppear:(BOOL)animated
{


    [super viewDidAppear:animated];

    [PHPhotoLibrary requestAuthorization:^(PHAuthorizationStatus status) {
        switch (status) {
            case PHAuthorizationStatusAuthorized:
                NSLog(@"PHAuthorizationStatusAuthorized");
                ipc = [[UIImagePickerController alloc] init];
                ipc.delegate = self;
                if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
                {
                    ipc.sourceType = UIImagePickerControllerSourceTypeCamera;
                    ipc.showsCameraControls = NO;
                    ipc.tabBarController.tabBar.hidden = YES;
                    ipc.allowsEditing = NO;

                    [self addChildViewController:ipc];
                    [self.view addSubview:ipc.view];
                    [ipc didMoveToParentViewController:self];

                }else{
                    ipc.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
                    //launch image picker view controller
                    ipc.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
                    [self presentViewController:ipc animated:YES completion:nil];

                }
                break;
            case PHAuthorizationStatusDenied:
                NSLog(@"PHAuthorizationStatusDenied");
                break;
            case PHAuthorizationStatusNotDetermined:
                NSLog(@"PHAuthorizationStatusNotDetermined");
                break;
            case PHAuthorizationStatusRestricted:
                NSLog(@"PHAuthorizationStatusRestricted");
                break;
        }
    }];
}
当我点击此视图的选项卡时,我只看到用于LibraryControlSource的IPC视图控制器在屏幕上向上滑动,然后不停地向下(好像被取消)。每次它向上滑动时,我都会在控制台中看到
Error Domain=PlugInKit code=13“query cancelled”
错误