/使用在iOS8 及其以上的系统/
UIUserNotificationSettings *setting = [[UIApplication sharedApplication] currentUserNotificationSettings];
if (UIUserNotificationTypeNone == setting.types) {
NSLog(@"推送关闭");
}else{
NSLog(@"推送打开");
}
如果用户没有开启通知 需要跳转到应用的设置中设置开启通知
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];