iOS应用随机将自己置于通知中的“不包含”部分

时间:2015-04-15 17:57:01

标签: ios objective-c iphone parse-platform push-notification

我们有一个使用Parse进行远程通知的iPhone应用程序。

我们通过以下方式注册用户/设备以进行远程通知:

    // Register for remote notifications the iOS8+ way or the older way
if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) {
    // Register the iOS8 way

    UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:
                                            UIUserNotificationTypeAlert |
                                            UIUserNotificationTypeBadge |
                                            UIUserNotificationTypeSound
                                        categories:nil];
    [application registerUserNotificationSettings:settings];
    [application registerForRemoteNotifications];
}
else {
    // Register the old way (pre iOS8)

    [application registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge|
     UIRemoteNotificationTypeAlert|
     UIRemoteNotificationTypeSound];
}

这很好用。紧随其后,我们正在按预期看到通知被发送到设备。

但是,偶尔我们会注意到设备似乎不再收到通知了。检查后,我们看到应用程序将自己置于“不包括”中。部分,在通知中。我们还没有确定何时或为何会发生这种情况的模式。

enter image description here

你看到了这个吗?为什么某个应用会决定拒绝这样的通知[由用户自发提示]?

0 个答案:

没有答案