All the well-behaved games I've played on iOS fade out their audio when you push the home button. It's a cool effect, because it lasts until just after the home screen appears, making for a very smooth transition.
From what I have read, Application.Quit(), Application.CancelQuit() and MonoBehaviour.OnApplicationQuit() don't work/aren't called on iOS. This makes it difficult to detect when the user has pushed the home button. By default, my app's music is playing, so it continues to play until just after the home screen appears, and then it cuts off.
How do I make a Unity app handle quitting elegantly?
I had always assumed this was an automatic effect because it seemed ubiquitous among games. Perhaps it's working in this manner because you have the debugger running? Have you tried just running your app on the device without being in debug mode?
– Thom_DenickOnApplicationPause and OnApplicationFocus may be what you need, they're called when the iphone app gets paused or refocused
– anon85704231Sounds good. I'll check those out.
– Daniel-Brauer