For those still struggling with this - make sure that your widget code has target membership for your widget extension AND your iOS app. This is required otherwise the background audio capability doesn't work. What's frustrating is it works on the simulator even if the iOS app isn't included in the target membership. If you run on a real device you'll get the error. Make sure you include both targets!!
Topic:
App & System Services
SubTopic:
Core OS
Tags: