0

我目前正在为 Android 开发一个 pkpass 库。有一点我想不通。Apple的PassKit Web 服务参考指定了如何注册设备以进行自动更新。这似乎只适用于 iOS 设备。

但是,有几个适用于 Android 的应用程序能够以某种方式注册自动更新。钱包通行证 | 以PassbookPass2U 钱包为例。

我使用PassSource 的 API创建了一个演示 pkpass 文件。当我在他们的网站上更新文件时,这些应用程序会以某种方式收到通知,然后向用户显示通知。

这是我试图创建的行为,但我一生都无法弄清楚要调用哪个参数的 URL。

我尝试了所有可能的值组合:

POST request to: webServiceURL/version/devices/deviceLibraryIdentifier/registrations/passTypeIdentifier/serialNumber

Parameters

webServiceURL
The URL to your web service, as specified in the pass.
version
The protocol version—currently, v1.
deviceLibraryIdentifier
A unique identifier that is used to identify and authenticate this device in future requests.
passTypeIdentifier
The pass’s type, as specified in the pass.
serialNumber
The pass’s serial number, as specified in the pass.
Header

The Authorization header is supplied; its value is the word ApplePass, followed by a space, followed by the pass’s     authorization token as specified in the pass.

Payload

The POST payload is a JSON dictionary containing a single key and value:

pushToken
The push token that the server can use to send push notifications to this device.

如苹果文档中所述。

我还研究了 Walletpasses 文档Pass2U 文档

非常感谢您的帮助!

谢谢!

4

0 回答 0