How to test ios11 promoted In-App Purchases How to test ios11 promoted In-App Purchases xcode xcode

How to test ios11 promoted In-App Purchases


I submitted the app with the limited testing as described above. And I was able to do real purchases of promoted in-app-purchases.

But there is a chicken and egg scenario here. Now that the items are in the store, I can run against a local/debug build and test from the App Store. But I think I also burned through several Sandbox User IDs trying things out.

Following is a sequence that I can now do.

1) Go to App Store and log out.

2) Build/run your app and use Restore Purchases - logging in with your Sandbox User ID/password.

3) Verify that your Sandbox User is now logged into the App Store (do not log in directly to the App Store with Sandbox User or that user will no longer work.)

4) Find your app and then find the In-App Purchases section with the promoted features. Select a promoted in-app purchase feature.

5) Your app is loaded. After a bit, one gets an alert with: Confirm Your In-App Purchase ---- Do you want to buy XXXX for $0.99? --- [Environment: Sandbox] ---- Cancel / Buy

6) After purchase one gets the alert: You're all set. ---- Your purchase was successful. ---- [Environment: Sandbox] ---- OK

7) if you do this on an item your Sandbox User has already purchased, you get an alert with: You've already purchased this. Would you like to get it again for free? ---- [Environment: Sandbox] ---- Cancel / OK

The point of the above is that you get alert messages like what you saw before rather than the receipt type item popping up from the bottom that you get when you do a real purchase.

Hope this helps, but still not a good answer for first time through.