I have push notifications in my app. Whenever the app is launched, I would like to check whether the user has enabled push notification for my application.
I do it this
Swift 4 version of salabaha's answer
extension UIApplication { class func openAppSettings() { UIApplication.shared.open(URL(string: UIApplicationOpenSettingsURLString)!, options: [:], completionHandler: {enabled in // ... handle if enabled }) }