Question

I have an app with inApp purchases. Sometimes something happens and iOS asks user to authorize in AppStore. Authorization alert appears at any moment. It happens even my app is closed! I suggest, this alert is due to some purchase fail. But if i enter Apple ID nothing happens. To solve this problem i want to know which events give rise to AppStore authorization alert?

Was it helpful?

Solution 2

The reason of my problem was very stupid. I forgot to call [[SKPaymentQueue defaultQueue] finishTransaction:transaction]. I think the AppStore authorization alert could be a result of unclosed in-app transactions.

OTHER TIPS

I don't install in-app purchases any more, but I think I solved it by adding the following to AppleDelegate and other viewcontrollers.

[[SKPaymentQueue defaultQueue] addTransactionObserver:self];

Like...

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [[SKPaymentQueue defaultQueue] addTransactionObserver:self];
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top