requestAccessForMediaType completionHandler to be called in UI thread. This leads to inconsistent behaviour once the permission is given

pull/1/head
Kamal Nath Narayanan 8 years ago committed by Michael Kirk
parent ad4ffae164
commit 153d4addb9

@ -46,7 +46,9 @@ NS_ASSUME_NONNULL_BEGIN
} else if (status == AVAuthorizationStatusNotDetermined) {
[AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL granted) {
if (granted) {
permissionsGrantedCallback();
dispatch_async(dispatch_get_main_queue(), ^{
permissionsGrantedCallback();
});
}
}];
} else {

Loading…
Cancel
Save