开发者

How to manage interface while In App Purchase is communicating with the Server?

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 w开发者_运维百科here they might never get their download, if they keep closing the screen before the download is done.

Any examples or suggestions would be appreciated.


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.

Your application should associate an observer with the payment queue when it launches, rather than wait until the user attempts to purchase an item. Transactions are not lost when an application terminates. The next time the application launches, Store Kit resumes processing transactions. Adding the observer during your application’s initialization ensures that all transactions are returned to your application.

http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/MakingaPurchase/MakingaPurchase.html#//apple_ref/doc/uid/TP40008267-CH3-SW1

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜