UIAlertView enter Apple ID and Password IAP

in-app-purchase, ios, uialertview

Solution

If you see only an authorize alert, not a purchase alert, that means you are trying to restore purchases.

If user taps on cancel button on authorize dialog, this delegate method gets called:

- (void)paymentQueue:(SKPaymentQueue *)queue restoreCompletedTransactionsFailedWithError:(NSError *)error;

Problem

When I start test my IAP the system requests me apple id and password. There is an alert view with ok and cancel buttons. I need to handle this button, because when I press on cancel button I need to make some action in app. Very important: there is an autorize dialog not a purchase alert. I need to know how to process this action in app (for example if user tap on cancel button and after this autorize dialog disappear)

Original source