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

+(BOOL)chargeIsCanPush

{

    if (iOS8){

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

            return (types & UIRemoteNotificationTypeAlert);

        }else{

            UIRemoteNotificationType types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];

            return (types & UIRemoteNotificationTypeAlert);

        }

}

posted @ 2016-08-16 16:41  Qiang zi  阅读(335)  评论(0)    收藏  举报