【问题标题】:Quickblox push notification failedQuickblox 推送通知失败
【发布时间】:2016-03-21 09:10:42
【问题描述】:

我正在使用 Quickblox 进行聊天应用程序。处理聊天的推送通知。我已将 APNs 开发证书上传到 Quickblox。我已经通过代码完成了订阅,它在 Quickblox 管理部分显示了我的设备。但是当我尝试通过管理面板发送推送通知时,推送通知不会到来。我正在选择“测试”环境和“IOS”频道,它显示:

"Success Apns channel. Notification has been successfully added to queue."

但通知不会出现在设备上。在队列部分中显示:

APNS (Apple Push) Delivered: 0, failed: 1
Download detailed log
Event log
2016-03-21 06:50:34 UTC : queued 1 notifications

详细日志显示:

{"notification":{"aps":{"alert":"msg","sound":"default"}},"log":[{"device_token":"my token","created_at":"2016-03-23T04:48:04Z","delivered_at":null,"failed_at":"2016-03-23T04:48:51Z","error_code":8,"error_description":"Invalid token (8)"}]}

注册我使用这个代码:

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
    NSString *deviceIdentifier = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
    [QBRequest registerSubscriptionForDeviceToken:deviceToken uniqueDeviceIdentifier:deviceIdentifier
                                     successBlock:^(QBResponse *response, NSArray *subscriptions)
    {
        NSLog(@"Successfully Registered......");
    }
                                       errorBlock:^(QBError *error)
    {
        NSLog(@"Error ------> %@", error);
                                     }];
}

它显示“成功注册......”我也可以在管理部分看到它。 请帮帮我..

【问题讨论】:

  • 详细日志中记载的错误是什么?
  • 它显示“error_description”:“Invalid token (8)”。有时它会显示 APNS (Apple Push) Delivered: 0, failed: 0 和错误日志“error_description”:“null”。知道我在做什么错吗?
  • 同一用户是否在您发送推送通知的订阅部分(Quickblox 管理面板)中注册了该设备?因为旧令牌可能会更改或失效
  • 是的。订阅部分显示的令牌和详细日志中显示的令牌都是相同的。 @Pyro
  • 您是否遵循了此处的完整指南:quickblox.com/developers/…

标签: ios push-notification apple-push-notifications chat quickblox


【解决方案1】:

使用新密钥和新开发证书再次创建新的 P12 证书。然后我收到了推送通知。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-03-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-01-29
    • 1970-01-01
    相关资源
    最近更新 更多