Restore already bought in-app-purchases on iPhone?

前端 未结 2 1766
萌比男神i
萌比男神i 2020-11-30 00:51

I got so far: After a reinstall, a user needs to click \"buy feature\", then he gets scared with the $0.99 question, then has to login and then gets told the feature is alre

相关标签:
2条回答
  • 2020-11-30 01:04

    If the $0.99 item is non-consumable, then you should provide a "Restore Purchases" button (or similar) which calls

    [[SKPaymentQueue defaultQueue] restoreCompletedTransactions];
    

    Assuming you've added a transaction observer already, and implemented the protocol including a case to handle a restored transaction (with state SKPaymentTransactionStateRestored) this will work.

    0 讨论(0)
  • 2020-11-30 01:18

    Add these two methods :

    [[SKPaymentQueue defaultQueue] addTransactionObserver:self];
    
    [[SKPaymentQueue defaultQueue]restoreCompletedTransactions];
    
    0 讨论(0)
提交回复
热议问题