内购与服务器通信时如何管理界面?
我的(沙箱)应用程序内购买正在运行,但如何确定应用程序是否正忙于与服务器通信?我很难让我的正常 ActivityiyIndicator 在这种设置下工作,该应用程序似乎在整个过程中进进出出响应能力。然后,如果用户在完成交易之前关闭屏幕,他们可能会陷入人为循环,如果他们在下载完成之前继续关闭屏幕,他们可能永远无法获得下载。
任何示例或建议将不胜感激。
I have my (sandbox) In App Purchase working, but how do I determine if the app is busy communicating with the server? I am having a rough time getting my normal ActiviyIndicator to work in this setting, the app seems to go in and out of responsiveness throughout the process. Then if the user closes the screen before finishTransaction, they can get caught in a human made loop where they might never get their download, if they keep closing the screen before the download is done.
Any examples or suggestions would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该通过响应委托方法并实现 SKPaymentTransactionObserver 来管理通信。
如果用户在交易完成之前关闭应用程序,则该过程将/应该在用户下次打开应用程序时恢复。
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/MakingaPurchase/MakingaPurchase.html#//apple_ref/doc/uid/TP40008267-CH3-SW1
You should manage the communication by responding to the delegate method(s), and also implementing the SKPaymentTransactionObserver.
If the user closes the app before the transaction is completed, the process will/should be restored on the next time that the user opens the app.
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/MakingaPurchase/MakingaPurchase.html#//apple_ref/doc/uid/TP40008267-CH3-SW1