After integrating Urban Airship, when I call
let appDelegate = UIApplication.sharedApplication().delegate as? AppDelegate
I always get nil. When I tried to get class of UIApplication.sharedApplication().delegate, it tells me, that it is UAAppDelegateProxy now.
But
let appDelegate = UIApplication.sharedApplication().delegate as? UAAppDelegateProxy
also returns nil.
How can I get my appDelegate?
Edit
I figured up, that this happens only when UAConfig
parameter automaticSetupEnabled
is set to true. When automaticSetupEnabled
is false, I get appDelegate as usual, but I'm losing advantages of urban airship automatic configuration.