Menu

InApp Purchase - Restore button

Fenistil
2014-02-05
2014-02-07
  • Fenistil

    Fenistil - 2014-02-05

    Hi!

    According to Apple's developer guide, if I use IAP in my App, I have to provide a button which the user can restore their already bought IAPs in the case he/she changed phone, reinstalled app, or something. If I call PurchaseProduct(['iap-id']) and the user has already bought it, the AppStore tells me, that it has been purchased, so it's ok. But if I have more IAPs, how can I find out, which was purchased before? I see that I should call restoreCompletedTransactions somehow, but I don't find it.

    Greetings

     
  • Fenistil

    Fenistil - 2014-02-05

    Hi

    I've added this method:

    procedure TDPFInAppPurchase.RestoreCompletedTransactions;
    begin
      TSKPaymentQueue.Wrap( TSKPaymentQueue.OCClass.defaultQueue ).restoreCompletedTransactions;
    end;
    

    And it works fine, the UpdatedTransactions event called with State=Restored, but how can I find what IAP has been restored?

     
  • Babak Yaghoobi

    Babak Yaghoobi - 2014-02-06

    Hi Fenistil

    • Added procedure TDPFInAppPurchase.RestoreCompletedTransactions;
    • Added productIdentifier parameter into OnUpdatedTransactions,

    Now you can get any purchased and restored or ... products,

    If you call RestoreCompletedTransactions method you can get a list of all products with states.

    Thank you for feedback.

    Regards

     
  • Fenistil

    Fenistil - 2014-02-07

    Thanks, it works!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.