Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbarela committed Aug 15, 2022
2 parents 0cfec45 + cb4c679 commit 043911e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Mage/ExternalDevice.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ + (void) checkCameraPermissionsForViewController: (UIViewController *) viewContr
break;
}
case AVAuthorizationStatusNotDetermined: {
[AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:complete];
[AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL granted) {
dispatch_async(dispatch_get_main_queue(), ^{
complete(granted);
});
}];
break;
}
case AVAuthorizationStatusRestricted: {
Expand Down Expand Up @@ -92,7 +96,11 @@ + (void) checkMicrophonePermissionsForViewController: (UIViewController *) viewC
break;
}
case AVAuthorizationStatusNotDetermined: {
[AVCaptureDevice requestAccessForMediaType:AVMediaTypeAudio completionHandler:complete];
[AVCaptureDevice requestAccessForMediaType:AVMediaTypeAudio completionHandler:^(BOOL granted) {
dispatch_async(dispatch_get_main_queue(), ^{
complete(granted);
});
}];
break;
}
case AVAuthorizationStatusRestricted: {
Expand Down

0 comments on commit 043911e

Please sign in to comment.