4

I am trying to record and play audio from keyboard extension in Swift, but it throws an error on line recordingSession.setActive(true)

Error: failed to record The operation couldn’t be completed. (OSStatus error 561015905.)

I have already set the key RequestsOpenAccess to true in info.plist and granted full access to the keyboard extension.

Daniyal Raza
  • 352
  • 3
  • 13
  • Never tried activating an audio session from a keyboard extension myself, but the error seems to be this one, if that helps: https://developer.apple.com/documentation/avfaudio/avaudiosession/errorcode/cannotstartplaying – adeasismont Mar 24 '22 at 19:16
  • Thanks but the application is in foreground when I'm recording and I've already given full access to the keyboard extension. – Daniyal Raza Mar 24 '22 at 19:28
  • And, just to make sure, have you added a microphone usage description to the extension’s Info.plist? – adeasismont Mar 24 '22 at 20:29
  • @adeasismont Yes, I have. – Daniyal Raza Mar 24 '22 at 22:01

0 Answers0