Store Kit 应用内购买通知速度慢

发布于 2024-12-07 17:01:15 字数 133 浏览 0 评论 0原文

我已按照在线示例教程将应用内购买集成到我的应用程序中。购买和解锁额外内容一切正常。但是,用于确认购买的通知可能需要 4-9 秒才会出现。这不会带来非常一致的用户体验,并使应用程序显得缓慢。

有其他人遇到过与此相同的问题或知道解决方法吗?

I have followed an example tutorial online for integrating in-app purchases in to my app. It is all working fine purchasing and unlocking the extra content. However, the notification that gets posted for confirming the purchase can take from 4-9 seconds to appear. This does not make for a very consistent user experience and makes the app appear slow.

Has anyone else had the same problem as this or know of a fix for it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

青芜 2024-12-14 17:01:15

时间过长和不一致可能源于以下原因:

当用户进行购买时,网络消息将发送到苹果服务器 - 根据与服务器的距离、消息经过的节点数量以及您所使用的连接质量,所花费的时间长度会不一致。

当消息到达时苹果服务器需要对其进行处理并生成响应 - 该时间的长度将根据当前影响服务器的负载而不一致。

然后,确认信息将通过网络传回 - 与传出消息适用相同的规则。

设备收到确认后将向用户显示警报。

除非您能够更改消息传输的网络或可以改善苹果服务器的响应时间,否则您将无法减少时间或不一致。

“解决方案”是显示一个活动指示器,其中包含一条有用的消息,向用户解释正在发生的情况,如果您打算这样做,建议使用以下实用程序 DSActivityView。它易于使用且连接快速,在我遇到类似问题时对我很有用。

The long length of time and inconsistency is probably originating from the following:

When the user makes a purchase network messages will be sent to apples server - the length of time this will take will be inconsistent depending on the distance from the server, the amount of nodes the message passes through and the quality of the connections you are using.

When the message reaches apples server it will need to be processed and a response generated - the length of this time will be inconsistent depending on the load currently affecting the server.

A confirmation then will be transmitted back over the network - same rules apply as for the outgoing message.

The device upon receiving the confirmation will display the alert to the user.

Unless you are able to make changes to the network which the message travels upon or can improve apples servers response times you will not be able to reduce the time or inconsistency.

A "solution" would be to display an activity indicator with a helpful message to the user explaining what is happening, if you plan on doing this recommend the following utility DSActivityView. Its easy to use and quick to hook up and has been useful for me when faced with similar problems.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文