1

我已经在苹果设备中创建了优惠券的静态版本。现在我想在通过 API 调用在我的数据库中更新值时直接在我的优惠券上更新我的新值。

我知道这就像登机牌一样,当座位号更改时,它直接在电子登机牌上更改。

如果您能提供很好的示例链接如何调用 API 以及如何从 API 获取值和更新优惠券,请提供很好的帮助,这将是很大的帮助。

注意:我的 API 不会在 Objective-C 中。

谢谢

4

2 回答 2

3

我在这里写了一篇关于如何为苹果钱包编写网络服务的文章:https ://medium.com/@yangzhoupostbox/asp-net-web-api-example-for-apple-wallet-passbook-a124a1d90bb3

于 2018-12-10T17:52:47.893 回答
3

您需要在后端解决方案中实施 Apple 通行证创建、分发和更新代码。查找以下参考资料和文档:

用于 JAVA 后端的 Apple Pass:

https://github.com/drallgood/jpasskit
https://dzone.com/articles/ios-and-android-push
http://www.ryantenney.com/passkit4j/

Apple Pass Web URL 规范:

https://developer.apple.com/library/content/documentation/PassKit/Reference/PassKit_WebService/WebService.html

适用于 PHP 后端的 Apple Pass:

https://github.com/tschoffelen/PHP-PKPass

Apple Pass 与 Ruby

https://oleb.net/blog/2013/02/passbook-tutorial/

带有 Node.js 的 APNS:

https://solarianprogrammer.com/2017/02/14/ios-remote-push-notifications-nodejs-backend/

更新 iOS Pass 的推送通知:

https://stackoverflow.com/questions/15877496/how-to-make-a-push-notification-for-a-pass

Pass Kit Web 服务参考: https ://developer.apple.com/library/content/documentation/PassKit/Reference/PassKit_WebService/WebService.html

重要提示:如果您使用任何 JAVA JAR,请检查您使用的服务器操作系统,例如 IBM AIX OS(使用 IBMX509)或 Oracle OS(使用 SUNX509)。许多Apple pass in JAVA 库都可用,它们只支持SUN JDK。如果您的服务器是 AIX OS 并且 JAR 使用 SUN,那么您可能会在最后一刻陷入巨大的麻烦。例如:来自https://github.com/drallgood/jpasskit的 jPassKit JAR仅支持 SUN JDK,因此您不能将其用于 IBM AIX OS 服务器。

于 2017-06-14T12:27:35.663 回答