0

I am creating an app with audio (microphone) calls, In order to do so I request permission for microphone via:

import AVFoundation

let mediaType = AVMediaType.audio
let authorizationStatus = AVCaptureDevice.authorizationStatus(for: mediaType)
switch authorizationStatus {
case .notDetermined:
    AVCaptureDevice.requestAccess(for: mediaType) { granted in
        print(" access \(granted ? "granted" : "denied")")
    }
case .authorized, .denied, .restricted:
    print("auth")
@unknown default:
    break
}

For this I have already added microphone usage description in my Info.plist.

Since my app doesn't use any camera or photo library, my app was still rejected by app with reason that my app doesn't have a cameraUsageDescription.

Is it required to provide cameraUsageDescription when I am only using just audio services?

I tried checking available documents or information, at official apple documents, but could not find anything which makes it mandatory to add cameraUsageDescription when I don't have any camera service in the app.

HangarRash
  • 7,314
  • 5
  • 5
  • 32
  • `AVCaptureDevice` requires both audio and video capabilities, even if you don't need video services, you need to include camera usage description. – Teja Nandamuri Sep 01 '23 at 14:25

1 Answers1

0

Mehboob Alam yes, it's mandatory to add camera and microphone usage description in order to use AVCaptureDevice class. This is mentioned in apple developer documentation.

enter image description here

Naresh
  • 869
  • 8
  • 17