ios - 钱包中的 Apple Pass 不会在推送通知时更新

标签 ios iphone apple-push-notifications passbook

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

什么有效:

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

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

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

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

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

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

最佳答案

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

请参阅部分:

Your Server Sends a Push Notification When Something Changes

wallet documentation .

Your server sends the following pieces of information:

  • The pass type identifier (in the certificate)
  • The push token (in the communication to the Apple Push Notification service)

关于ios - 钱包中的 Apple Pass 不会在推送通知时更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47537835/

相关文章:

iPhone 应用程序支持文件夹包含构建前的文件

iphone - ios Mapkit : fix annotation on middle of map

xamarin.ios - 某些标记格式的 Azure 通知中心注册失败

应用暂停时的 iOS 通知

ios - 解决配置文件问题后,iPhone 设备中的应用程序安装失败并丢失设备管理

ios - 是否可以在 iOS 上发送 SILENT LOCAL 通知

apple-push-notifications - 用于开发/沙盒的 APNs key (.p8 文件)

ios - 当用户的手指滑入特定区域时是否可以触发 Action ?

ios - Xcode 7 : linker command failed with exit code 1 (use -v to see invocation) again

ios - 如何在 SwiftUI 中将 LocalizedStringKey 更改为 String