0 Replies
      Latest reply on Sep 10, 2019 2:34 AM by nevos
      nevos Level 1 Level 1 (0 points)

        I am unable to connect bluetooth headphones while the app is backgrounded in iOS 13, iOS 13.1 and iOS 12.4. This was working fine in iOS 12.3 and below.


        Steps to reproduce:

        1. Configure an app to record in the background. Alternatively, use the Apple built-in "Voice Memos" app.

        2. Start the app.

        3. Background the app and observe the red pill appearing, indicating that the app is accessing the microphone.

        4. Connect Bluetooth headphones.

        5. Observe the red pill disappearing and recording stops.


        Expected behaviour:

        The audio recording should continue seamlessly when a bluetooth device is connected/disconnected.


        Is anyone else observing this?


        Side notes:

        1. If I add some code to restart the audio recording (tearing down and restarting the AVAudioEngine graph) when an audio device is connected, and repeat the above steps, I get the same behaviour but with the following error:

        [aurioc] 1590: AUIOClient_StartIO failed (561145187)
        [avae] AVAEInternal.h:109 [AVAudioEngineGraph.mm:1544:Start: (err = PerformCommand(*ioNode, kAUStartIO, NULL, 0)): error 561145187
        [Error] The operation couldn’t be completed. (com.apple.coreaudio.avfaudio error 561145187.)


        2. I feel like this must be related to: https://forums.developer.apple.com/thread/120038