I want to change the device volume on iOS (iphone).
I know that i can change the volume of music library with this lines below:
//implement at firs
The app should not change device global settings and you should not do that. User can do that using standard iOS features. Instead, if you playing a sound/video, then use player's volume:
volume
var player: AVPlayer! ... player.volume = 0.5 // 50% level