Reputation: 61
I am utilizing the parse.com sdk for a number of things in my app, so I thought I would also piggyback on it for my in app purchase. I have an alert view with an "Upgrade" button that calls the following block. I have verified that the block is being called but I am not able to get to the completion block. Has anyone else encountered this?
if ([buttonTitle isEqualToString:@"Upgrade"])
{
[PFPurchase buyProduct:@"com.mysite.myapp.fullversionupgrade" block:^(NSError *error) {
if (!error) {
UIAlertView *succesfulUpgradeAlert = [[UIAlertView alloc]initWithTitle:@"Upgrade Complete" message:@"Thank you for upgrading." delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
[succesfulUpgradeAlert show];
}
}];
}
I should also point out that this app is not yet up and running on the app store, and I just added the in app purchase information today. Does that make a difference? I understand those can be factors, but my alert view is simply being dismissed and, again, I'm not even getting to the completion block.
Upvotes: 1
Views: 1281
Reputation: 19790
I don't quite understand your question:
my alert view is simply being dismissed and, again, I'm not even getting to the completion block.
Does that mean you are getting an alert? If that is the case, doesn't that mean that your completion block is being called?
I am using the same exact code in production right now, and it works. If you want to try In App Purchase, try it on your device and create a test account in iTunes Connect. Don't rely on the simulator for this, I have mixed results with the simulator.
Upvotes: 1