iOS: Change Device Volume

Using iPodMusicPlayer would affect the actual iPod volume setting as well. If you want to avoid that, use this:

#import <MediaPlayer/MediaPlayer.h>
// ...
MPMusicPlayerController *musicPlayer = [MPMusicPlayerController applicationMusicPlayer];
musicPlayer.volume = 1.0f; 

As the user holex correctly mentioned the property volume in MPMusicPlayerController is deprecated in iOS 7.

Leave a Comment

tech