Sunday, 25 August 2013

Following Ray Wenderlich's In App Purchase Tutorial, how do i implement logic to check if a product was purchased

Following Ray Wenderlich's In App Purchase Tutorial, how do i implement
logic to check if a product was purchased

his tutorial Introduction to In App Purchases
http://www.raywenderlich.com/21081/introduction-to-in-app-purchases-in-ios-6-tutorial
how can I check if something is purchased? I want to check this with an
if-statement. So, when "this" is bought, then do this and so on. I can't
figure out what to write for the if-statement for the life of me.
can someone please answer this question explicitly? i have seen it posted
in a few different places but none of the answers are straightforward
enough for a complete novice like myself to comprehend. I found the exact
same question here but the answer made no sense to me Check which product
the user bought on an In-App Purchase
specifically, what is the code to do this part
"The resources zip for this tutorial contain images for all of the the
comics, so if you're so inclined you can wrap it up by showing the comic
in a new view controller when a purchased row is tapped! If you want to do
this, you can just check if the productIdentifier is in the
purchasedProducts array of the InAppRageIAPHelper before allowing the user
access to the content."
I have everything working perfect from the tutorial, i just dont know how
to use it.
i have a main menu view controller that has 3 buttons. i want to disable 2
of the buttons by default, but if the user has purchased the respective
products, then i want to enable the buttons. i know it has something to do
with NSUSerDefaults but I am very dense and am not able to understand a
lot of the implicit answers people give for this question. If someone
could spell it out for me I would be very grateful.
Thank you

No comments:

Post a Comment