Sandbox: is it possible to simulate an unsuccessful or interrupted app purchase?

I recently applied an app to purchase apps in my app. Good thing Apple fully documented the whole process .

Using these documents, I can finally test the App Purchase application through Sandbox, which is very convenient. I have successfully tested my application so that it responds to what it returns StoreKitwhen I click buyButton.

Now here is my question. The docs say Sandbox mimics a transaction process without financial means. Therefore, I can buy as much as I want (by the way, I buy supplies and only supplies). In addition, the sandbox will ALWAYS simulate a successful transaction, no matter what. So, is it possible for Sandbox to simulate a transaction failure , or better yet, a transaction aborted ?

I want to do this in order to catch possible errors when these events occur (although I read somewhere that I’m StoreKitalready processing this) and displays them on the screen (at least), just to tell the user what is happening during the transaction.

Thanks in advance.

+5
source share
2 answers

An easy way to simulate many common problems with network transactions is to disconnect the network cable from the back of the Wi-Fi access point used at different points in the process. You can try things like disconnecting a wifi WAN cable, and then use alternate access or cable access to remove IAP from accessibility in iTunes Connect and then turn on Wi-Fi access again.

0
source

The best way to simulate various network situations is with the Network Link Conditioner utility. This event is mentioned in Apple's documentation regarding testing network operations .

, , . , / .

OSX ( ) iOS.

0

All Articles