title: Swift: how to set the iphone volume programmatically
body: <p>I am trying to create an alarm app and I have noticed that apps like Sleep Cycle will set your volume to max right before the alarm goes off, even if you had the volume at very low. </p>
  
  <p>I have tried using AVAudioPlayer and all I have seen with MPVolumeView is that the user must do it. 
  Is there any way I can turn it up without the user having to do it?</p>
  
  <p>Thank you for your help.</p>
  
  <p>If I could please get the code in swift</p>