AVAudioSessionErrorCodeCannotStartRecording when recording in the background with iOS 13

Hello.


I am working on adding support for iOS 13. Previously the app has been able to record audio for transmition while in the background when the user presses an external button, such as one from a wired headset. This is important as many users such as first responders are currently able to talk by pressing a button, rather than pulling the phone out of a pocket, unlocking it, launching the app etc.


I can't find any sort of recording in the background permission to put in the info plist. Are there any special categories or options needed in the Audio Session to permit this on iOS 13? Failing that, is there a way to launch the app when the user presses the button ( wired or bluetooth le) so the recording can start?


How does the Messages App allow recording on the notification? Inter-App Audio?


Thanks.

Replies

Have a good news, Yesterday I receive the DTS response, they aware of the problem with interruptions, and a fix is planned for the future. 🙂

Hi, I'm also affected by this bug (it's still present in ios 13 beta 8), do you have any news on that ?


Thanks

We also have the same problem and have filed a bug with Apple in feedback assistant. Nr 561145187. So far they only wrote they are investigating. What bug nr do you have? Could you share the tesponse where they acknowledge it is a bug? Kind regards Jens

I've submitted a feedback nr FB7102819 , still no response.


When I'll got response I'll update this thread.


Seroiusly I hope tath they will revert to old behaviour 😟

Thanks I will update our feedback with a reference to this id @k.alonso: what response did you get? Can you share it and what id? I read that there is a security issue in 12.4 and that 12.4.1 is expected. I hope this issue will get some focus also. Kind regards Jens

@deadlock I just tested this with iOS 12.4.1 and it is still broken.

Did anyone test with 13.1 developer beta 1? I'm waiting for the public beta to get released.

It works with 13.1 beta 1. I can start recording in the background. I hope that Apple will fix also iOS 12.4.x.

Please, can share a piece of code for demonstrate that?


I Upgrade to 13.1 beta 1 and, from log i report:


XXXX is in the background and doesn't have the entitlement to start recording in the background.

I also can not start recording in the backgound with. 13.1 beta 1. I use the API "recordForDuration" of AVAudioRecorder,it also return NO in the background.Could tell me which API do you use can works in the background?

Hi,
I am having the same problem, Our app is on the app store now and I hope this is resolved soon.

Just tested with the 13.1 beta, and still get the error.

+1 ;-(

Same also for me ios 13.1 beta ... still unable to start recording from background

do you have any suggestion that can help us ?


tnx in advance