Created
September 28, 2016 06:58
-
-
Save mfks17/54839374f088f28b9b7fc803ad467cf1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
FIRApp.configure() | |
let types: UIUserNotificationType = [UIUserNotificationType.Badge, UIUserNotificationType.Alert, UIUserNotificationType.Sound] | |
let settings: UIUserNotificationSettings = UIUserNotificationSettings( forTypes: types, categories: nil ) | |
application.registerUserNotificationSettings( settings ) | |
application.registerForRemoteNotifications() | |
return true | |
} | |
func registerForPushNotifications(application: UIApplication) { | |
let settings: UIUserNotificationSettings = UIUserNotificationSettings(forTypes: [.Alert, .Badge, .Sound], categories: nil) | |
application.registerUserNotificationSettings(settings) | |
application.registerForRemoteNotifications() | |
} | |
func tokenRefreshNotificaiton(notification: NSNotification) { | |
let refreshedToken = FIRInstanceID.instanceID().token()! | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment