在inapp购买中恢复按钮 [英] restore button in inapp purchase
问题描述
我将带有应用程序内购买功能的应用程序上传到itunes store.But苹果拒绝了我的应用程序,因为没有恢复按钮。如果我添加了恢复按钮,我该如何获取本地存储的数据?请帮我解决这个问题。
I uploaded my app with in-app purchase feature to itunes store.But apple rejects my app due to "there is no restore button".If I added "Restore" button,how can I get my locally stored data?Please help me to solve this.
推荐答案
如果,当你打电话给 [[SKPaymentQueue defaultQueue] restoreCompletedTransactions]时;
,将之前购买的商品的状态设置为YES,应该没有问题。您不需要考虑已存储的本地数据。
If, when you call [[SKPaymentQueue defaultQueue] restoreCompletedTransactions];
, setting the status of a purchase to YES for something that has been purchased before, there shouldn't be a problem. You won't need to consider the local data you have stored.
从NSUserDefaults检索内容:
To retrieve something from NSUserDefaults:
[[NSUserDefaults standardUserDefaults] integerForKey:@"intKey];
这篇关于在inapp购买中恢复按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!