IAP Introductory Price purchase fails in sandbox

Hi,

I am developing a new feature for our app and I'm having a few problems to test introductory prices. I'll describe the configuration I'm testing.

I created two products to test introductory prices. The first one is set to be used as 2 months with a reduced price and after that regular price. The second one is set to provide the first month for free and regular price after that.

Both products were created in the same way but changing the payment mode (pay as you go for the first and free trial for the second)

When I test free trial subscription witha fresh sandbox account it works as expected. However when I try to purchase "pay as you go" product with a fresh sandbox account it shows the message "You are all set - Your purchase was successful" but inmediatelly after dismissing the alert control an error appears with description:

SKErrorDomain Code=0 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store}

I validated the receipt and purchase is not reflected.


Am I missing something? All tests are being performed in real device, not simulator. How can I test the IAP before sneding the verison for submission?

Replies

same problem 😟,https://twitter.com/RevenueCat/status/1106235357413036032

If it's not an issue w/the backend (and there have been a ton lately according to the lone status page that is still up), then perhaps the walk-thru here can help sort things: https://forums.developer.apple.com/message/272745#272745

One thing you may be missing is the possibility that two transactions are hitting your device in rapid succession, you are processing the first and ignoring the second. Do you remove your transaction observer?


Another thing you may be missing is the possibility that the app remains partially attached to that first test user. When changing test users it is best to delete the old build of the app and log out of the app store before reinstalling from Xcode and waiting to log in until asked to do so by StoreKit. This is necessary when going from a production build to a sandbox build. Perhaps it is also necessary when changing sandbox users.