views:

623

answers:

1

Hi,

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.

+5  A: 

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.

Louis Gerbarg
It should read `[SKPaymentQueue restoreCompletedTransactions]`. ;)
Pascal