Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bypass iPhone Ring/Silent Switch?

Discussion in 'iOS and tvOS' started by supdawg, Sep 20, 2015.

  1. supdawg

    supdawg

    Joined:
    Jul 8, 2012
    Posts:
    11
    Hi, Im not very familiar with using or building for iOS so im seeking advice about the use of the 'Ring/Silent switch', and if possible a way to bypass.

    It seems Unity by default mutes audio when this switch is enabled. lm a little confused why it would do this when a) this buttons function is surely just to enable/disable the ringer and b) it also accepts volume and mute instructions from the separate system audio levels.

    Many apps bypass the Ring/Silent Switch, why doesnt Unity? Is there a reason why i shouldnt seek to do this? If not how to I do it?
     
  2. BenoitFreslon

    BenoitFreslon

    Joined:
    Jan 16, 2013
    Posts:
    163
    Hello Supdawg,

    Did you find how to ignore the mute button on iOS?

    Thanks.
     
  3. supdawg

    supdawg

    Joined:
    Jul 8, 2012
    Posts:
    11
  4. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    565
    I just wanted to comment on this in case anyone else comes across it Googling, like I did.
    The purpose of the mute switch is to mute all sound except important ones like the Alarm, etc. Apple Developer Guidelines: https://developer.apple.com/ios/human-interface-guidelines/interaction/audio/

    If your app is a game, you should allow the switch to mute audio. Any games doing this are not "bypassing" the switch, they are failing to implement the recommended guidelines. Apple is not very strict with this requirement though.

    Now if your app fits one of the categories that Apple recommends can be permitted to ignore this switch, then you have a valid concern in wanting to bypass what Unity is doing by default.
     
  5. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    Weirdly their own app Garage Band ignores this advice.... go figure.
     
  6. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    I wonder if there is at least a way to detect the mute is on so that you tell the user...
     
  7. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    823
  8. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
  9. chloelcdev

    chloelcdev

    Joined:
    Sep 19, 2021
    Posts:
    7
    Given that most native apps do not abide by the mute switch this is a little bit ridiculous of an excuse for Unity. Enough apps ignore the mute switch completely that we consistently get user reports that the sound of our game does not work, and unity gives us no real way to address it. Our game engine should not be forcing us into apples recommended product guidelines, especially when the trend started when their first party applications ignored the mute switch. It is now a meaningless toggle that people completely forget is on or exists.

    If you cannot properly support iOS in 2021, you are on your way out the door as a game engine.
     
    Last edited: Oct 19, 2021
  10. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    565
    Wow. What utter BS.
     
  11. chloelcdev

    chloelcdev

    Joined:
    Sep 19, 2021
    Posts:
    7
    I'm sorry, how ridiculous of me. Our users use any given first-party app and many more daily while getting full sound, then switch to our app and all the sudden it's silent. Is my point "utter BS" because I would like some amount of consistency, or to not be railroaded by my game engine, or at a bare minimum a built-in functionality for checking the mute switch... or are our users contributing the utter BS when they open our game, Spotify still playing in the background, and they get no sound from our game in particular?

    They, of course, assume our app is dysfunctional.

    A few apps that bypass the ring switch:
    Apple Music
    Apple TV
    Photos
    Podcasts
    News
    Maps
    (If you haven't caught on yet, none of the default apps abide the ring switch)
    Spotify
    Pandora
    Discord

    We're supposed to tell our users everyone but us is crazy?
     
    Last edited: Oct 19, 2021
  12. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    565
    @chloelcdev When you make absolute statements like "most native apps do not abide by the mute switch" and calling the switch a "meaningless toggle" you will of course get responses that address such a statement.

    I've already posted a link to Apple's guidelines on the matter and it clearly states under what conditions and type of audio the switch can be ignored or not, even going so far as to say that "game soundtracks" should be muted.
     
  13. chloelcdev

    chloelcdev

    Joined:
    Sep 19, 2021
    Posts:
    7
    ... most native apps do not abide by the ring switch. I just listed off every first-party pre-installed app that makes sound as ones that, confirmed, do not abide by the ring switch. Even the guidelines you for some reason believe are a smoking gun don't state that all your sound should be muted.

    People switch their device to silent when they want to avoid being interrupted by unexpected sounds like ringtones and incoming message tones. In this scenario, they also want to silence nonessential sounds, such as keyboard clicks, sound effects, game soundtracks, and other audible feedback. When a device is in silent mode, it should play only the audio that people explicitly initiate, like media playback, alarms, and audio/video messaging.


    "play only the audio that people explicitly initiate", which is, some of the sounds in our game. To play any sounds in our game, we need to be able to get around Unity muting all of our audio. What point are you trying to make here by quoting Apple guidelines that don't say Unity should be muting all our audio?
     
  14. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    565
    You've answered your own question:
    play only the audio that people explicitly initiate, like media playback, alarms, and audio/video messaging.

    All those "Native apps" you listed aren't games. The exceptions are ... well, it says it right there, so I won't be redundant. Just because you want to interpret that to mean audio in a game so that you can claim an exception to the guidelines doesn't mean that's the case. Unity should be muting audio because it's a game engine. If you're using it to make an iOS non-game app with it, you're the minority.

    And why do I care about Apple guidelines? Because not following them more often than not gets your app rejected.
     
  15. Carocrazy132

    Carocrazy132

    Joined:
    Aug 16, 2015
    Posts:
    15
    Games sometimes contain explicitly initiated audio. You don't seem to care about Apple guidelines, just being right. Honestly, the game engine would probably be doing better right now if people like you didn't consistently jump in to defend absolute nonsense.
     
    Last edited: Nov 5, 2021
  16. Nsingh13

    Nsingh13

    Joined:
    Dec 17, 2014
    Posts:
    38
    Yeah, I'm going to have to agree with @Carocrazy132. Even if games are not defined as an exception in the guidelines, doesn't make it right or intuitive to the user when they expect the game should have audio if their Youtube audio is working.

    Any admins from unity available to comment on this?