Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
NSInteger types;
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.f) {
types = UIUserNotificationTypeBadge | UIUserNotificationTypeAlert | UIUserNotificationTypeSound;
} else {
types = UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeBadge;
}
[XPush registerForRemoteNotificationTypes:types];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment