Could you use NotificationCenter observers? https://developer.apple.com/documentation/foundation/notificationcenter/1415360-addobserver
let audioSession = AVAudioSession.sharedInstance()
NotificationCenter.default.addObserver(self, selector: #selector(handleVolumeChange(_:)), name: AVAudioSession.volumeChangedNotificationName, object: nil)
Then handle your logic to pop-up the alert for changing volume in another function handleVolumeChange