Skip to content

Instantly share code, notes, and snippets.

@dannycabrera
Created December 2, 2014 02:08
Show Gist options
  • Save dannycabrera/91360a81c182cfa30dac to your computer and use it in GitHub Desktop.
Save dannycabrera/91360a81c182cfa30dac to your computer and use it in GitHub Desktop.
Register for iOS 8 Notifications
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