Skip to content

Commit 043911e

Browse files
committed
Merge branch 'develop'
2 parents 0cfec45 + cb4c679 commit 043911e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Mage/ExternalDevice.m

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ + (void) checkCameraPermissionsForViewController: (UIViewController *) viewContr
3434
break;
3535
}
3636
case AVAuthorizationStatusNotDetermined: {
37-
[AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:complete];
37+
[AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL granted) {
38+
dispatch_async(dispatch_get_main_queue(), ^{
39+
complete(granted);
40+
});
41+
}];
3842
break;
3943
}
4044
case AVAuthorizationStatusRestricted: {
@@ -92,7 +96,11 @@ + (void) checkMicrophonePermissionsForViewController: (UIViewController *) viewC
9296
break;
9397
}
9498
case AVAuthorizationStatusNotDetermined: {
95-
[AVCaptureDevice requestAccessForMediaType:AVMediaTypeAudio completionHandler:complete];
99+
[AVCaptureDevice requestAccessForMediaType:AVMediaTypeAudio completionHandler:^(BOOL granted) {
100+
dispatch_async(dispatch_get_main_queue(), ^{
101+
complete(granted);
102+
});
103+
}];
96104
break;
97105
}
98106
case AVAuthorizationStatusRestricted: {

0 commit comments

Comments
 (0)