iOS Background audio recording

前端 未结 2 479
余生分开走
余生分开走 2020-12-31 19:54

I know that if I start an audio recording session in foreground, with Audio, Airplay, and Picture in Picture activated in Capabilities -> Background Modes; I am able to cont

2条回答
  •  天涯浪人
    2020-12-31 20:18

    From Apple Documentation

    An app that plays or records audio continuously (even while the app is running in the background) can register to perform those tasks in the background. You enable audio support from the Background modes section of the Capabilities tab in your Xcode project. (You can also enable this support by including the UIBackgroundModes key with the audio value in your app’s Info.plist file.) Apps that play audio content in the background must play audible content and not silence.

    Typical examples of background audio apps include:

    Music player apps Audio recording apps Apps that support audio or video playback over AirPlay VoIP apps

    For tasks that require more execution time to implement, you must request specific permissions to run them in the background without their being suspended. In iOS, only specific app types are allowed to run in the background:

    • Apps that record audio content while in the background

    EDIT:

    Also regarding your "Bluetooth device":

    Check out the documentation for ExternalAccessory .

    Be aware that you need to apply and get approved for a special developer program in order to be able to create external accessories.

提交回复
热议问题