IOS8 兼容本地推送
文章目录
if ([UIApplication instancesRespondToSelector:@selector(registerUserNotificationSettings:)])
{
[[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert|UIUserNotificationTypeBadge|UIUserNotificationTypeSound categories:nil]];
}
IOS8中需要先注册本地通知,用户点击了同意之后才能接受本地通知。
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论