【发布时间】:2016-12-17 19:04:15
【问题描述】:
我不想显示“请求通知权限”对话框,只是将我的应用程序的禁用设置添加到设备设置中。
问题是如果应用程序不请求这些权限,那么相关设置根本不会出现在设备设置中。
我调用权限对话框的代码:
UIUserNotificationType types = UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge;
UIUserNotificationSettings *mySettings = [UIUserNotificationSettings settingsForTypes:types categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:mySettings];
您能帮忙解决这个问题吗?目前我只使用本地通知
【问题讨论】:
-
您需要申请通知权限才能让该部分进入设置
-
这件事你别无选择,必须显示弹窗
标签: ios permissions notifications uilocalnotification localnotification