Created
January 12, 2018 15:26
-
-
Save xtremepush-gists/a02ef9cd7a027f5cd64d123bc894339f to your computer and use it in GitHub Desktop.
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
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