How to play audio in iOS in background?

Viewed 65

My goal is to make iOS play audio in a background.

When the audio is received by iPhone, it's not played unless I open the app in the foreground. Basically, the iPhone is "waiting" when I click to open the app, and then it plays the audio.

Following Developer Guide, I added ios.background_modes=music to my .properties file. However, nothing changed in behaviour.

I receive audio in real time via websocket class (onMessage(byte[] message) method).

What approach would you suggest in order to resolve this issue and make iOS play audio in a background?

1 Answers

This is the syntax for adding via the GUI not editing the properties file directly. You need to add the property with a codename1.arg. prefix.

Specifically: codename1.arg.ios.background_modes=music

Related