IOS8 new system needs to use new code to register the push
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)];
}
The method to determine if push is open is:
Determine if push is turned on
if (isiOS8)
{
Uiusernotificationtype type = [Application currentusernotificationsettings].types;
if (type) {
}else
{
}
NSLog (@ "-Push type------%d", type);
}
Else
{
Uiremotenotificationtype type = [Application enabledremotenotificationtypes];
if (type) {
}else
{
}
NSLog (@ "-Push type------%d", type);
}
IOS8 Remote Notification Processing