This code used to work in swift 4.
NotificationCenter.default.addObserver(self, selector: #selector(handleInterruption(_:)), name: NSNotification.Name.AVAudioSessionInterruption, object: nil)
Since updating to Swift 4.2 it gave me suggestion to change to
NotificationCenter.default.addObserver(self, selector: #selector(handleInterruption(_:)), name: Notification.Name.AVAudioSession.interruptionNotification, object: nil)
After changing to the suggested fix, I am getting Error: Type 'Notification.Name' (aka 'NSNotification.Name') has no member 'AVAudioSession'
Any help would be appreciated.