Last active
November 23, 2018 17:01
-
-
Save scott-lydon/c06a70a65cdd24162eda9bfbc2ba3e1f to your computer and use it in GitHub Desktop.
AppDelegate call to registerFor Remote Notifications
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
//The following line should already be present in your AppDelegate.swift file | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { | |
//Here is the call! Add the next line! It is recommended to ensure the registration is placed on the main thread. | |
DispatchQueue.main.async { | |
self.registerForPushNotifications() | |
} | |
//This should already be here | |
return true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment