How do I know if my phone’s ringtone is turned off or on? Using fast

What code do I use to determine if the iPhone ringer is on or off?

The application that I create plays music in the background, if the iphone ringer switch is off, then I want the music to stop playing.

My question is similar to this, but I want to get an answer in fast and iOS8 ...

Silent Mode Detection in iOS 7

code:

if iphoneRinger == On { self.playmusic() } else { self.stopmusic() } 
+6
source share

Source: https://habr.com/ru/post/986978/


All Articles