【问题标题】:Apple Passes in Wallet don't update on push notifications钱包中的 Apple Pass 不会在推送通知中更新
【发布时间】:2018-05-12 06:42:46
【问题描述】:

我在将 Apple Wallet 的 Apple 推送通知与我的网络服务集成时遇到问题。

什么有效:

然后我在服务器上更新一个通行证。当我尝试发送推送通知时,没有任何反应。

我做了一些调试,APN 服务器 (https://api.push.apple.com:443) 返回代码 200,其正文为空且“apns-id”标头为非空。这看起来不错 (https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html)。

但是!我的 iPhone 上的 Wallet 中既没有通知也没有更新的通行证。

当我进行手动更新时,会显示通行证更新和更新通知。

我无法理解我做错了什么......

附:我使用 https://github.com/mdigger/apns 向 APNS 发出请求。

【问题讨论】:

  • 您使用什么证书进行 APNS 连接?
  • 我正在使用这个证书:Apple Push Services: [...];身份:Apple 推送服务:[...];验证人:Apple 全球开发者关系认证机构;过期:XX/XX/18
  • 这是您的问题 - 您需要使用 Pass Type ID 证书连接到 APNS。
  • 当我下载 Pass Type ID 证书时,它是 .cer - 但似乎我需要 PEM 用于 APNS?

标签: ios iphone apple-push-notifications passbook


【解决方案1】:

当连接到 APNS 以进行电子钱包更新时,您需要使用用于签署通行证的相同通行证类型 ID 证书进行连接。

参见章节:

您的服务器会在发生变化时发送推送通知

wallet documentation.

您的服务器发送以下信息:

  • 通行证类型标识符(在证书中)
  • 推送令牌(在与 Apple 推送通知服务的通信中)

【讨论】:

  • 有没有办法使用 http APNs 来更新通行证?或者我们只能使用二进制api trought“gateway.push.apple.com”端口2195?
猜你喜欢
  • 2018-01-11
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-09-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多