我正在使用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);
}];
}
它显示"成功注册......"我也可以在管理部分看到它。 请帮帮我..
答案 0 :(得分:3)
使用新密钥和新开发证书再次创建新的P12证书。然后我收到推送通知。