khenid

Untitled

Feb 25th, 2015
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. extern "C" {
  2. void *_EnableLocalNotificationIOS8();
  3. }
  4.  
  5. void *_EnableLocalNotificationIOS8()
  6. {
  7. UIApplication *app = [UIApplication sharedApplication];
  8.  
  9. if ([app respondsToSelector:@selector(registerUserNotificationSettings:)])
  10. {
  11. UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound categories:nil];
  12. [app registerUserNotificationSettings:settings];
  13. [app registerForRemoteNotifications];
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment