Questo è il comportamento previsto secondo le Linee guida Apple.
dalle Linee guida per l'interfaccia umana Apple iOS :
Users switch their devices to silent when they want to:
- Avoid being interrupted by unexpected sounds, such as phone ringtones and incoming message sounds
- Avoid hearing sounds that are the byproducts of user actions, such as keyboard or other feedback sounds, incidental sounds, or app startup sounds
- Avoid hearing game sounds that are not essential to using the game, such as sound effects and soundtracks
Specificamente per i giochi:
Scenario 3: A game that allows users to guide a character through different tasks. You provide:
- Various gameplay sound effects
- A musical soundtrack
In this app, sound greatly enhances the user experience, but isn’t essential to the main task. Also, users are likely to appreciate being able to play the game silently or while listening to songs in their music library instead of to the game soundtrack.
Approfondimento Linee guida audio per tipo di app , Apple consiglia l'uso di Categorie di AVAudioSessionCategoryAmbient o AVAudioSessionCategorySoloAmbient , definite come:
- AVAudioSessionCategoryAmbient/AVAudioSessionCategorySoloAmbient
[...]
Your audio is silenced by screen locking and by the Silent switch (called the Ring/Silent switch on iPhone).
Di conseguenza, per le app del tipo di riproduzione, la categoria consigliata è AVAudioSessionCategoryPlayback, definita come tale:
- AVAudioSessionCategoryPlayback
[...]
The category for playing recorded music or other sounds that are central to the successful use of your app.
When using this category, your app audio continues with the Silent switch set to silent or when the screen locks.
Se gli sviluppatori seguono le linee guida, questo è il comportamento previsto a meno che Apple non decida di cambiare il funzionamento delle categorie nel sistema operativo.