但不管设置没设置都会弹出警告说没有设置
这是我用的方法
if(isIOS8){
BOOL isRemoteNotify = [UIApplicationsharedApplication].isRegisteredForRemoteNotifications;
[self shareNotificationCheck:!isRemoteNotify];
}
else{
UIRemoteNotificationType type = [[UIApplicationsharedApplication]enabledRemoteNotificationTypes];
int typeBadge = (type & UIRemoteNotificationTypeBadge);
int typeSound = (type & UIRemoteNotificationTypeSound);
int typeAlert = (type & UIRemoteNotificationTypeAlert);
BOOL ret = !typeBadge || !typeSound || !typeAlert;
[selfshareNotificationCheck:ret];
}
其中[self shareNotificationCheck:YES ]是弹出警告框的
JPush极光推送问题,用户是否打开允许推送信息的开关,但不管设置没设置都会弹出警告说没有设置
最新推荐文章于 2026-04-20 09:33:36 发布
本文介绍了一种用于检查iOS应用是否正确设置了远程通知的方法。通过判断不同类型的通知是否已启用,可以确保应用能够正常接收推送。

8304

被折叠的 条评论
为什么被折叠?



