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.
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.