判断APP目前的推送状态,是否可以推送

+(BOOL)chargeIsCanPush

{

    if (iOS8){

            UIUserNotificationType types = [[UIApplication sharedApplication] currentUserNotificationSettings].types;

            return (types & UIRemoteNotificationTypeAlert);

        }else{

            UIRemoteNotificationType types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];

            return (types & UIRemoteNotificationTypeAlert);

        }

}

原文地址:https://www.cnblogs.com/KingQiangzi/p/5776914.html