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

it2022-05-09  22

+(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


最新回复(0)