Microphone
An instrument for converting sound waves into electrical energy variations which may then be amplified, transmitted, or recorded.
In this blog we will understand what is microphone, why and when we need permission in iOS app and how to know a app accessing our microphone or camera.
Permission
If our app have voice record functionality then we need to ask microphone permission to app users.
Starting with iOS 10, you must set the NSMicrophoneUsageDescription property in your info.plist for microphone permissions and include a message for the user.
This message is shown to the user at time of the request.
To ask permission we will code like this
If you have to implement any logic based on user response then you have this Switch case to do
Wow! our implementation is done.
Allow or Deny from settings
Open the Settings app. Tap on a app you want to allow or deny microphone permisison > Use switch for your decision.
How to see which apps are using your microphone
Thank you, Happy coding!