Oks*_*ana 5 iphone xcode push-notification apple-push-notifications
如何检查iPhone上是否启用了通知?我安装应用程序,应用程序说确认启用应用程序的推送通知,我单击确定.但是,如果在iPhone上禁用通知,则此操作不会启用通知.怎么检查?
这应该工作:
UIRemoteNotificationType types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
if (types == UIRemoteNotificationTypeNone)
// Disabled
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6117 次 |
| 最近记录: |