0

I am trying to make an app that will silence your phone in the background. The purpose of the app is to silence your phone when you are at a certain location. How would I do this in SWIFT 3? I am pretty sure I have seen an app on the app store that does this, but I do not know how to do it.

nyg
  • 2,380
  • 3
  • 25
  • 40
fellowProgrammer
  • 327
  • 3
  • 17
  • 1
    Possible duplicate of [How to programmatically silence the ringer or change the ringer tone on iOS5](https://stackoverflow.com/questions/9320725/how-to-programmatically-silence-the-ringer-or-change-the-ringer-tone-on-ios5) – Ashutosh Dave Sep 02 '17 at 12:50
  • My question is in **SWIFT** so it is not a duplicate of How to programmatically silence the ringer or change the ringer tone on iOS5 – Ashutosh Dave because that is in objective-c – fellowProgrammer Sep 02 '17 at 12:57
  • The question asked was not the question answered. The person asked how to silence the device and the person showed him how to vibrate the phone - Ashutosh Dave – fellowProgrammer Sep 02 '17 at 13:07
  • 1
    AVSystemController.shared().setVolumeTo(10.0, forCategory: "Ringtone") – Sahil Manchanda Sep 02 '17 at 13:59
  • How do I access AVSystemController? – Sahil Manchanda – fellowProgrammer Sep 02 '17 at 15:23

0 Answers0