I created UISwitch to enable/disable push notifications that should be supported by both iOS 7 and iOS 8. I am trying to figure out how to get this working in iOS 8. Can't figure out what to fill in the following blank:
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
{
.......... fill in here...for iOS 8.........................
}
else
{
UIRemoteNotificationType types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
BOOL turnedOffFromWithinNotificaitonCenter = (types == UIRemoteNotificationTypeNone);
if (turnedOffFromWithinNotificaitonCenter){
_remindersSwitch.on = FALSE;
}
else{
_remindersSwitch.on = TRUE;
}
}
Any suggestion appreciated. Thanks.