From what I can tell from their documentation, it seems that the only way to maintain a constant background connection is to use one of my seven background mode keys , which I see that you have tried since you registered for background sound. I also know some emergency applications that use this feature (such as a sleep cycle), and I believe that they also use background audio mode, given that the other six modes are not remotely close to what they need.
I think that Apple’s reasoning may be that these applications are allowed to do this because their application is intended to be used when the user is not using the phone actively (i.e. when he is sleeping) and requires the user to wake the sound, then as if you use a secure application that wants to be active at all times, it can interfere with other functions that the user can use, for example, in Skype. The red bar will also be stored in the upper part of the device at any time when the user uses it, which they might mistake for what is still playing, because usually when the red bar appears, it means that the user is still actively using something . Again, I think that applications for the alarm clock and others like them that do not use constant sound can get away from this, since they are intended to be used when the phone is inactive, therefore with a constant red bar when the application is not visible - it is not problem.
In some other cases, such as Nike + (discussed here ) and probable pedometers, they seem to use the background location mode, as they often also keep track of where you went and need to know the distance. In this discussion with which I am associated, it seems that others have been able to get accelerometer updates by registering for use in the background. Have you tried registering to move your location? One drawback I can see is that it can reduce battery life faster, but if you check the location infrequently, it might not be so bad? The other is that I don’t think you can directly play audio in the background, but can you try to trigger a sound notification? :) This might be a good workaround for it if it works for your application.
Again, my arguments for why these applications can do this are based only on how I saw how other applications work, and Apple may have different reasons why they accept them, but that was my best way of thinking why your application is rejected to use these modes, while others may do so. If the location is not what you are looking for, unfortunately, I’m not sure what your application seems like to be able to constantly work in the background as you expect.
Jacob Terry
source share