- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    //-- Set Notification
        if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
        {
            [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]];
            [[UIApplication sharedApplication] registerForRemoteNotifications];
        }
        else
        {
            [[UIApplication sharedApplication] registerForRemoteNotificationTypes:
             (UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert)];
        }
     //--- your custom code
     return YES;
}
Monday, August 18, 2014
[English] The Push-Notification on iOS8
In iOS8 maybe "registerForRemoteNotificationTypes:" is deprecated. So if you wanna get notification list in iOS 8. You should follow this way. 
Labels:
iOS
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment