|
|
@ -109,17 +109,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD |
|
|
|
} |
|
|
|
|
|
|
|
private func registerForNotification(application: UIApplication) { |
|
|
|
// if #available(iOS 10.0, *) { |
|
|
|
// // For iOS 10 display notification (sent via APNS) |
|
|
|
// UNUserNotificationCenter.current().delegate = self |
|
|
|
// let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound] |
|
|
|
// UNUserNotificationCenter.current().requestAuthorization( |
|
|
|
// options: authOptions, |
|
|
|
// completionHandler: {_, _ in }) |
|
|
|
// } else { |
|
|
|
// |
|
|
|
// } |
|
|
|
// |
|
|
|
|
|
|
|
let settings: UIUserNotificationSettings = |
|
|
|
UIUserNotificationSettings(types: [.alert, .badge, .sound], categories: nil) |
|
|
|
application.registerForRemoteNotifications() |
|
|
|