0
我正在使用Quickblox进行应用程序聊天。处理聊天的推送通知。我已将APNs开发证书上传到Quickblox。我通过代码完成了订阅,并在Quickblox管理部分显示了我的设备。但是当我试图通过管理面板发送推送通知时,推送通知不会到来。我选择“测试”环境和“IOS”通道,它显示:Quickblox推送通知失败
"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”:“无效标记(8)”。有时它显示APNS(苹果推送)交付:0,失败:0和错误日志“error_description”:“null”。任何想法我做错了什么? – Monika
在您要发送推送通知的订阅部分(Quickblox管理面板)中是否注册了该设备的用户?因为旧的令牌可能会更改或无效 – HardikDG