标签:
1、检测是否开启本地应用推送功能
-(BOOL)isOpenNotification{ if([[[UIDevice currentDevice] systemVersion]floatValue]>=8.0){ UIUserNotificationType types=[[UIApplication sharedApplication]currentUserNotificationSettings].types; return (types & UIRemoteNotificationTypeAlert); }else{ UIRemoteNotificationType types=[[UIApplication sharedApplication]enabledRemoteNotificationTypes]; return (types & UIRemoteNotificationTypeAlert); } }
2、跳转对应应用开启推送允许通知
[[UIApplication sharedApplication]openURL:[NSURL URLWithString:@"prefs:root=NOTIFICATIONS_ID&&path=xxxxx]];
“xxxx”是指你的bundleid
标签:
原文地址:http://www.cnblogs.com/superbobo/p/5455017.html