Obtenez une instance appdelégate Swift

let appDelegate = UIApplication.shared.delegate as! AppDelegate
let aVariable = appDelegate.someVariable
Clumsy Cod