The following code intermittently throws causing app to crash;
center.requestAuthorization(options:[.badge, .alert, .sound]) { (granted, error) in
}
it is called from within func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool method.
center is defined as;
let center = UNUserNotificationCenter.current()
Any clue as to why center.requestAuthorization intermittently throws causing crash?
Thanks