iOS10以上同步获取通知设置

更新时间:2023-07-01 17:26:15 阅读: 评论:0

if (instance == nil)
{
[SpecificPush new];
}
}
return instance;
}
- (instancetype)init
巴西气候{
NSAsrt(!instance, @"WARNING - Instance of SpecifishPush already exists");
lf = [super init];
if (lf)
{
lf.currentNotificationSettings = PushNotificationTypeNone;
}
instance = lf;
return lf;清平乐画堂晨起
}
- (PushNotificationType)types
{
if (@available(iOS 10.0, *))
{
dispatch_maphore_t maphore = dispatch_maphore_create(0);
[[UNUrNotificationCenter currentNotificationCenter] getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings *ttings) {
if ((ttings.soundSetting == UNNotificationSettingDisabled) && (ttings.alertSetting == UNNotificationSettingDisabled) && (ttings.soundSetting == UNNotificationS            {
lf.currentNotificationSettings = PushNotificationTypeNone;
}
if (ttings.badgeSetting == UNNotificationSettingEnabled)
{
lf.currentNotificationSettings = PushNotificationTypeBadge;
}
if (ttings.soundSetting == UNNotificationSettingEnabled)
{
lf.currentNotificationSettings = PushNotificationTypeSound;
}
if (ttings.alertStyle == UNNotificationSettingEnabled)榴莲饼
{
lf.currentNotificationSettings = PushNotificationTypeAlert;
}
dispatch_maphore_signal(maphore);
}];
dispatch_maphore_wait(maphore, DISPATCH_TIME_FOREVER);
dispatch_relea(maphore);
}
el
{
UIUrNotificationSettings *ttings = [[UIApplication sharedApplication] currentUrNotificationSettings];
if (pes == UIUrNotificationTypeNone)
{
lf.currentNotificationSettings = PushNotificationTypeNone;
}
if (pes & UIUrNotificationTypeBadge)
{
lf.currentNotificationSettings = PushNotificationTypeBadge;鹦鹉的特点
}
李圣杰if (pes & UIUrNotificationTypeSound)
{
lf.currentNotificationSettings = PushNotificationTypeSound;
}
if (pes & UIUrNotificationTypeAlert)
{
lf.currentNotificationSettings = PushNotificationTypeAlert;
职业化培训
上海交通大学医学院分数线}
}
热爱祖国的诗歌

本文发布于:2023-07-01 17:26:15,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/1063411.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:气候   画堂   鹦鹉   职业化   医学院
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图