推送通知在一个设备中,但在另一个设备中没有

问题描述 投票:0回答:1

推送通知即将在我的iPhone和iPad上发布,但是当我发送它时它不会出现在另一部iPhone上。我不明白为什么它不会来。我已经创建了所有必需的证书。添加设备ID。仍然没有来。请帮忙。(这是沙箱模式)。

当我尝试使用https://pushtry.com发送通知时,我收到以下错误

错误响应命令:8标识符:0状态:8-无效令牌

ios apple-push-notifications
1个回答
2
投票

脚步:

  1. 在您的所有设备中安装应用时,请检查是否使用了相同的配置文件
  2. 如果相同..转到developer.apple.com查看您所使用的配置文件是否已签入所有设备
  3. 现在处于调试模式,检查是否 func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { var deviceTokenStr = deviceToken.description.replacingOccurrences(of: ">", with: "", options: .caseInsensitive, range: nil) deviceTokenStr = deviceTokenStr.replacingOccurrences(of: "<", with: "", options: .caseInsensitive, range: nil) deviceTokenStr = deviceTokenStr.replacingOccurrences(of: " ", with: "", options: .caseInsensitive, range: nil) print(deviceTokenStr) }

这个方法被调用,即所有设备都已注册推送通知服务

现在,在上面的方法中,获取您的推送通知令牌“deviceToeknStr”并使用它来检查使用站点的推送通知

https://pushtry.com

在调试模式下使用您的pem文件,证书的密码和devicetokenStr。

© www.soinside.com 2019 - 2024. All rights reserved.