Last active
October 6, 2017 12:35
-
-
Save Ravi61/76e354c8311dd4faad5d76d00c097df0 to your computer and use it in GitHub Desktop.
Code for UserNotificationDelegate
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
class UserNotificationAppDelegate: NSObject, UIApplicationDelegate { | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? = nil) -> Bool { | |
// check if app lauched via notification | |
return true | |
} | |
func applicationWillTerminate(_ application: UIApplication) { | |
// schedule a local notification | |
} | |
func application(_ application: UIApplication, didRegister notificationSettings: UIUserNotificationSettings) { | |
// some code | |
} | |
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) { | |
// handle remote notification | |
} | |
func application(_ application: UIApplication, didReceive notification: UILocalNotification) { | |
// handle local notification | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment