Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone + In App purchase + determine whether product is purchased or not

I am implementing In App purchase in my application.

What I want to do is that I have few features that are locked and once user click that feature it will ask to buy that product and once they buy, the feature will be unlocked. But before that I have to check whether that particular product is already purchased by the user or not. If its already purchased I don't want to show the alert for buying that product.

How to achieve this.

like image 954
pratik Avatar asked Nov 09 '09 08:11

pratik


1 Answers

Ideally you should save the information about what has been purchased when it is purchased, so you can just check it yourself. In the event of an application reinstall it is possible to query the app store to see all your past transactions.

If you want to get a list of previous transactions from the store you use -[SKPaymentQueue restoreCompletedTransactions]. The restored transactions can be verified just like normal transactions.

like image 87
Louis Gerbarg Avatar answered Oct 18 '22 19:10

Louis Gerbarg