I have implemented in-app purchase in my project. The implementation worked well but I have a problem to store a response.
I unlocked the button and when I go through in
You need to implement it like.
When the purchase is successful set a bool
in NSUserDefaults
like:
[[NSUserDefaults standardUserDefaults] setBool:YES ForKey:@"isPurchased"];
In the viewDidLoad
of the class, write like:
if([[NSUserDefaults standardUserDefaults] boolForKey:@"isPurchased"])
{
//Enable/show the button
}
else
{
//disable/hide button
}
This is a nice tutorial, please refer it also
I have developed storekit for non consumable product. You can try it. ;)
Happy coding!