ios 8 интерактивных уведомлений не показывает действия

Это мой код для регистрации интерактивных уведомлений для ios8:

+ (void)registerInteractiveNotifications
{
    UIMutableUserNotificationCategory *corideInviteCategory = [self corideInviteCategory];
    UIMutableUserNotificationCategory *riderInviteCategory = [self riderInviteCategory];

    NSSet *categories = [NSSet setWithObjects:corideInviteCategory, riderInviteCategory, nil];
    UIUserNotificationType types = (UIUserNotificationTypeAlert|
                                    UIUserNotificationTypeSound|
                                    UIUserNotificationTypeBadge);

    UIUserNotificationSettings *settings;
    settings = [UIUserNotificationSettings settingsForTypes:types
                                                 categories:categories];

    [[UIApplication sharedApplication] registerUserNotificationSettings:settings];
}

+ (UIMutableUserNotificationCategory *)riderInviteCategory
{
    UIMutableUserNotificationAction *accept;
    accept = [[UIMutableUserNotificationAction alloc] init];
    [accept setActivationMode:UIUserNotificationActivationModeForeground];
    [accept setTitle:@"Accept"];
    [accept setIdentifier:RiderInviteAccept];
    [accept setDestructive:NO];
    [accept setAuthenticationRequired:NO];

    UIMutableUserNotificationAction *decline;
    decline = [[UIMutableUserNotificationAction alloc] init];
    [decline setActivationMode:UIUserNotificationActivationModeForeground];
    [decline setTitle:@"Decline"];
    [decline setIdentifier:RiderInviteDecline];
    [decline setDestructive:YES];
    [decline setAuthenticationRequired:NO];

    UIMutableUserNotificationCategory *actionCategory;
    actionCategory = [[UIMutableUserNotificationCategory alloc] init];
    [actionCategory setIdentifier:RiderInviteCategory];
    [actionCategory setActions:@[decline, accept]
                    forContext:UIUserNotificationActionContextDefault];
    [actionCategory setActions:@[decline, accept] forContext:UIUserNotificationActionContextMinimal];

    return actionCategory;
}

+ (UIMutableUserNotificationCategory *)corideInviteCategory
{
    UIMutableUserNotificationAction *accept;
    accept = [[UIMutableUserNotificationAction alloc] init];
    [accept setActivationMode:UIUserNotificationActivationModeForeground];
    [accept setTitle:@"Accept"];
    [accept setIdentifier:CorideInviteAccept];
    [accept setDestructive:NO];
    [accept setAuthenticationRequired:NO];

    UIMutableUserNotificationAction *decline;
    decline = [[UIMutableUserNotificationAction alloc] init];
    [decline setActivationMode:UIUserNotificationActivationModeForeground];
    [decline setTitle:@"Decline"];
    [decline setIdentifier:CorideInviteDecline];
    [decline setDestructive:YES];
    [decline setAuthenticationRequired:NO];

    UIMutableUserNotificationCategory *actionCategory;
    actionCategory = [[UIMutableUserNotificationCategory alloc] init];
    [actionCategory setIdentifier:CorideInviteCategory];
    [actionCategory setActions:@[decline, accept]
                    forContext:UIUserNotificationActionContextDefault];
    [actionCategory setActions:@[decline, accept] forContext:UIUserNotificationActionContextMinimal];

    return actionCategory;
}

Что происходит: когда я удаляю приложение и устанавливаю снова, появляются 2 кнопки действий (когда я опускаю баннер уведомлений или проводишь влево в центре уведомлений). Но через некоторое время (я не совсем уверен, с чем это связано), они перестают появляться, хотя я продолжаю отправлять одно и то же уведомление. Это мой контент уведомлений:

{"aps":{"alert":"test","category":"coride_invite"},"journey_id":100}

Может кто-нибудь пролить свет, пожалуйста? Спасибо

Ответы на вопрос(1)

Ваш ответ на вопрос