Set the slider value based on the AVAudiosession volume || mobile system volume based slider change in iOS swift
Solution: If you are adjusting the volume in your phone volume button based on slider change you can follow the below steps override func viewDidDisappear( _ animated: Bool ) { AVAudioSession.sharedInstance().removeObserver( self , forKeyPath: "outputVolume" ) do { try AVAudioSession.sharedInstance().setActive( false ) } catch { debugPrint( " \ ( error )" ) } } func listenVolumeButton() { let audioSession = AVAudioSession.sharedInstance() do { try audioSession.setActive( true ) } catch { print( "some error" ) } audioSession.addObserver( self , forKeyPath: "outputVolume" , opt...