Search code examples
iosairplay

adding UIBackgroundModes "audio" gets app rejected when playing a video for AirPlay?


I am developing an app that streams HLS videos on AVPlayer. As per the guide over here https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html and here https://developer.apple.com/library/ios/qa/qa1668/_index.html#//apple_ref/doc/uid/DTS40010209-CH1-VIDEO inside the Important box.

With respect to this My App has been rejected because of UIBackgroundModes ,

they reject the app if done so -- if I don't add the key, the AirPlay quits as soon as I navigate out of the app by pressing home button, is there a workaround to this?


Solution

  • Quote them this line from there own documentation

    Important: The UIBackgroundModes audio key will also allow apps to stream media content in the background using AirPlay

    Taken from documentation here . I exactly had the same issue and quoted them this documentation and then the app was accepted.