You should either have no progress bar, or, make another AlertView, when SKPaymentStatePurchasing
then make a void
:
- (void) purchasingProductAlertShow {
UIAlertView *purchasingProductAlert = [[UIAlertView alloc]
initWithTitle:@""
message:[NSString stringWithFormat:@"Loading..."]
delegate:nil
cancelButtonTitle:@""
otherButtonTitles:nil];
[purchasingProductAlert show];
}
or something like that, then, when SKPaymentStatePurchased
do purchasingProductAlert = nil;
You may want to make your own, custom Alert view for purchasing, though.
You could also alert them when the purchase is finished, You could do that like so: when SKPaymentStatePurchased
make a void
:
- (void) purchasedProductAlertShow {
UIAlertView *purchasedProductAlert = [[UIAlertView alloc]
initWithTitle:@"Complete!"
message:[NSString stringWithFormat:@"Your purchase is complete! You will now be able to enjoy no ads!"]
delegate:nil
cancelButtonTitle:@"Okay!"
otherButtonTitles:nil];
[purchasedProductAlert show];
}
for the message you would want to put whatever you want there, I'm using removing ads as an example. Then in SKPaymentStatePurchased
do [self purchasedProductAlertShow]
as well as any of your other code. This will make it so that when the user completes a purchase, it shows the alert purchasingProductAlert