Created
December 2, 2014 02:08
-
-
Save dannycabrera/91360a81c182cfa30dac to your computer and use it in GitHub Desktop.
Register for iOS 8 Notifications
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
public override bool FinishedLaunching (UIApplication app, NSDictionary options) | |
{ | |
UIUserNotificationType notificationTypes = UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound; | |
var settings = UIUserNotificationSettings.GetSettingsForTypes(notificationTypes, new NSSet (new string[] {})); | |
UIApplication.SharedApplication.RegisterUserNotificationSettings (settings); | |
UIApplication.SharedApplication.RegisterForRemoteNotifications (); | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment