Users receive a alert which ask them to receive apple push when they use our app first time. The OS Version of the device is ios 8.0 or later.User allow the request. ios8.0 device can receive apple push, but ios 8.1 can not. I use this code:
UIRemoteNotificationType myTypes = UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound;
[application registerForRemoteNotificationTypes:myTypes];
not use:
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:(UIRemoteNotificationTypeBadge |UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert) categories:nil];
[application registerUserNotificationSettings:settings];
I do not know the error!Someone can help me. Thanks!
Try to use "show" instead of the "push" because the latter is deprecated, and it is a hint that it will not be use anymore in the future.