Menu

How to store InApp purchase data?

Fenistil
2014-01-22
2014-01-27
  • Fenistil

    Fenistil - 2014-01-22

    Hi!

    I've almost finished my app, but I can't make InApp purchase complete, because I can't securely store what the user bought. I've found that the best solution is the using of keychain. But there is no API for it in the iOS SDK, so it can't be done in Delphi. There is an external library, but it can't be implemented in Delphi. :( In XCode you have to call C code to store and retreive secure data, but I don't know it is possible in Delphi. Here is a good tutorial for it. I'm looking for any other solution for that problem.

    Thanks

     
  • Babak Yaghoobi

    Babak Yaghoobi - 2014-01-22

    Hi Fenistil

    Do you see the InAppPurchase demo ?

    In the DPFInAppPurchase component have UpdatedTransactions event and you can see State parameter with this values :

    SKPaymentTransactionStatePurchasing,
    SKPaymentTransactionStatePurchased,
    SKPaymentTransactionStateFailed,
    SKPaymentTransactionStateRestored
    

    Regards

     
  • Fenistil

    Fenistil - 2014-01-22

    Hi

    Thanks for the fast reply! Yes I've already checked it (and doing it in that moment too), but after the user bought something and restarted my App, how to check if he/she has it? Probably there is no internet connection at the moment, so I have to store somewhere this information.

    Thanks

     
  • Babak Yaghoobi

    Babak Yaghoobi - 2014-01-22

    Hi Fenistil

    Use TDPFUserDefaults component for save and restore your data,

    Regards

     
  • Fenistil

    Fenistil - 2014-01-26

    Thanks, one more question. Is it secure? For example, if someone who using a jailbroken iphone, buy my app, then post my default values to a torrent site with my app, it can be copied? Or the information is only accessed to my app?

     
  • Babak Yaghoobi

    Babak Yaghoobi - 2014-01-27

    Hi Fenistil

    On jailbreaked devices we cant protect our app for 100%.
    But you can encrypt your data in default setting with device ID and decode it with device ID,

    Regards

     
  • Fenistil

    Fenistil - 2014-01-27

    That seems to be good. I'll give it a chance. Thanks a lot!

     

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.