Buying an iphone in-app: by mistake, whose responsibility notifies the user?

I have a complete solution for purchasing applications, but I am wondering if I handle errors correctly. I handle errors using code similar to Apple's example.

- (void) failedTransaction: (SKPaymentTransaction *)transaction { if (transaction.error.code != SKErrorPaymentCancelled) { // Optionally, display an error here. } [[SKPaymentQueue defaultQueue] finishTransaction: transaction]; } 

But my question is: WILL Storekit displays the corresponding errors for the user (it is impossible to connect, decline payment, etc.). Or do I always need to handle this? It seems that during testing, when the storekit is working fine, it really handles the errors themselves, so I can silently reset them (well, actually, we register them on another server).

However, when the storekit sandbox is playing, we get random errors indicating a problem and NO notifications from the store itself.

What are you guys doing with the mistakes? Do you always warn the user or will it duplicate warnings that have already been provided by storekit.

Thanks Roger

+6
iphone storekit
source share
2 answers

It is the responsibility to handle errors.

The operating system does not display the message, because the fact that the message is to be displayed, or to display it at all (unlike, for example, deleting an item from the table), is something that the OS cannot be sure about.

0
source share

I can confirm that you must handle this type of error yourself. I have a game with StoreKit support in the App Store. See http://www.appulize.com/index.php?cID=80

I used a simple approach to display UIAlert when something went wrong.

0
source share

All Articles