In-App Purchase fails after release

I am developing an iOS application with In-App Purchase (IAP). I tested the IAP (in the sandbox environment) and it's working fine.

However, once we released the app we started facing an issue - users buy subscription but the content is still restricted.


My app has auto-renewal subscriptions. I check receipt by sending it to Apple Server (buy.itunes.apple.com/verifyReceipt).

I receive the receipt

[[NSBundle mainBundle] appStoreReceiptURL]


Restore purchase via

[[SKPaymentQueue defaultQueue] restoreCompletedTransactions]

doesn’t work as well.

Can I test it in another environment except for sandbox in order to understand what cases the issue?

Try it yourself to see if it works in your hand in the production environment.

Look at the app's behavior and error messages that the app displays and determine whether the problem is in receipt verification or delivering the product.


There are only a few differences between sandbox and production - be sure you checked 'ready for sale' for the IAP on iTunesConnect.

Elena,


Are you certain that the app is validating the receipt with the production receipt validation server. The fact that the app made it through app review and is failing in the production environment tells me that the app sends the app to the sandbox validation server. The fact that restoreCompletedTransactions fails follows because the app isn't calling finishTransaction after the validation process fails. The restoreCompletedTransactions call only restores purchases where the finishTransaction call has been made.


Does the app log the status result for the receipt validation process. If so, take a look at the console log. If this is new to you, I suggest using the Apple Configurator 2 app to access the console log - instructions follow


Install the Apple Configurator 2 application available from the Mac App Store

<<https://itunes.apple.com/us/app/apple-configurator-2/id1037126344?mt=12>

1. Launch the Apple Configurator 2 application and attach the device to the system.

2. Control click the device in the Apple Configurator 2 window and select the “Get Info” contextual menu item.

3. On the left side column, select the console item.

4. Before starting the app, click “Clear”.

5. Start the application and perform the steps to replicate the problem.

6. Press the “Save” button to save the console log.


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI

In-App Purchase fails after release
 
 
Q