-
-
Save lmiller1990/e3272d1d69133654a8db67eeaff9503d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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