Skip to content

Instantly share code, notes, and snippets.

@lmiller1990
Created October 8, 2019 13:14
Show Gist options
  • Save lmiller1990/e3272d1d69133654a8db67eeaff9503d to your computer and use it in GitHub Desktop.
Save lmiller1990/e3272d1d69133654a8db67eeaff9503d to your computer and use it in GitHub Desktop.
import UIKit
import CoreData
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate {
func userNotificationCenter(
_ center: UNUserNotificationCenter,
willPresent notification: UNNotification,
withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions)
-> Void) {
completionHandler([.alert, .badge, .sound])
}
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
UNUserNotificationCenter.current().delegate = self
return true
}
// ... omitted
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment