Skip to content

Commit

Permalink
Check for microphoneusagedescription
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt-Carey committed Jun 12, 2024
1 parent 94e9261 commit bba3621
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ typedef void (*Callback)(bool);

-(int) getPermission
{
if(nil == [[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSMicrophoneUsageDescription"]) return -1;

switch([AVCaptureDevice authorizationStatusForMediaType : AVMediaTypeAudio])
{
case AVAuthorizationStatusAuthorized:
Expand Down

0 comments on commit bba3621

Please sign in to comment.