If I receive a call with CallKit when the phone is locked, and the user has never been asked for microphone permission for my app before, after swiping to answer, I record no audio, and the user is not asked for microphone permission even though my app asks for it. The user will just think the recording is broken. When you unlock, you will see the microphone permission alert, but that is too late.
Is there a way to ask for microphone permission when answering a call on the lock screen?