简体   繁体   English

我可以在用户查看密码套件后15分钟自动更新密码套件QR吗?

[英]Can I update a passkit QR automatically 15 mins after the user views it?

If a user downloads a pass, can the QR be refreshed from the service on a short timeline, such as every 15 mins. 如果用户下载通行证,可以在较短的时间线上(例如每15分钟一次)从服务中刷新QR。

Our systems run out of codes very quickly, so the client needs to get a new code every 15 mins. 我们的系统很快就会用完代码,因此客户需要每15分钟获取一次新代码。 That's fine on other media. 在其他媒体上也可以。 Long term this will be solved by changing the length the codes so we don't run out so quickly, in the short term can this be achieved using passkit? 从长远来看,这将通过更改代码的长度来解决,因此我们不会很快用完,短期内可以使用passkit来实现吗?

You can send a push notification requesting that Wallet update your pass whenever you like, as described in the Updating a Pass documentation; 您可以发送推送通知,要求电子钱包随时更新您的通行证,如更新通行证文档中所述; note, though, that if you send too many pushes too close together, Wallet will start rate-limiting your updates to conserve the user's battery and cellular-data usage. 但是请注意,如果您将太多推推推得太近,Wallet将开始限制更新速率,以节省用户的电池和蜂窝数据使用量。 I don't think the rate-limiting rules are documented anywhere (they're mentioned briefly in the 2013 WWDC session ), so you may have to do some experimenting to find out whether that update schedule is viable. 我认为没有任何地方记录限速规则(在2013年WWDC会议中简要提到了这些规则),因此您可能必须做一些试验才能确定更新时间表是否可行。

更新流程图

As to “after the user views it”: no, there's no API for that; 关于“用户查看之后”:不,没有针对此的API; you get one notification when the user first adds your pass to their library, and one when they either delete it or disable automatic updating for it. 当用户首次将您的通行证添加到他们的图书馆时,您会收到一条通知;而当用户删除或禁用自动更新时,您会收到一条通知。 Assuming whatever scanning system you're using is connected to your server, you might consider “the pass with this code was scanned” as an event that should trigger an update push to all passes with that code on them. 假设您正在使用的扫描系统已连接到服务器,则可以将“已扫描此密码的通行证”视为一个事件,该事件应触发对其中包含该密码的所有通行证的更新推送。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 15分钟后,后台位置更新在ios中不起作用? - After 15 mins Background Location update is not working in ios? ios 8后台服务在15到20分钟后结束 - ios 8 background service ends after 15 to 20 mins iOS PassKit部分更新和隐私 - iOS PassKit partial update and privacy iOS重大更改位置事件不会每15分钟更新一次应用 - iOS Significant-Change Location event doesn't update the app every 15 mins 如何快速使用/集成存折/钱包/ PassKit进行活动邀请? - How can i use/integrate Passbook/Wallet/PassKit for Event Invitation in swift? 如何使自动刷新视图起作用? - How can I get Automatically Refresh Views to work? UITextview 调整大小后自动重新定位视图 - iOS - Automatically reposition views after UITextview resizes - iOS 在 iOS 15 上将 isSelected 设置为 true 后立即自动取消选择 UICollectionViewCell - UICollectionViewCell is automatically deselected immediately after setting isSelected to true on iOS 15 初次登录后如何自动登录用户? - How do I automatically login in a user after the initial login? 您可以使用一种颜色为 15x15 网格中的一系列文本视图着色,而另一种则使用不同的颜色吗? - Can you colour a range of text views in a grid 15x15 with a colour and another with a different one?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM