I have successfully implemented the IAP. However I am wondering how to actually implement the checking of purchased items.
Before purchasing:
there is a button to purchase on the view. this button is always visible.
Just after purchasing:
I just hide the purchase button, enable to new content, and everything is fine.
But, what I’d like to know is how do you set a flag for the user that he/she already bought the item so that the next time he/she runs the app, the button to purchase should not be visible anymore and the new content is already available. I’m thinking just a plain userdefaults… but, won’t this be easy to hack though? How can I check for this?
Am I missing something here? Thanks.
you can get an array contain all product id’s that user already buy it like this
then when populate your items you can check if the contains its ID you disable your button.
For sure its easy to do that using database or NSUserDefault but this way is useful in case the user delete the app and install it again or if he using more than one device.