How do I test In-App Purchase using Simulator?

I am no longer able to test In-App Purchases with Simulator for iOS 12. When I leave the iTunes account setting off, my sandbox account won't connect to iTunes with the error object reporting error message "Cannot connect to iTunes Store". When I try to put my sandbox account in the iTunes account setting, I get a message that says, "There was a problem connecting to the server."

Accepted Reply

Apple has stated multiple times that IAP must be tested on a device not on the simulator. There have been versions of iOS and MacOS that have allowed you to test IAP in the simulator - but that is the rare gift rather than something to be expected.

Replies

Apple has stated multiple times that IAP must be tested on a device not on the simulator. There have been versions of iOS and MacOS that have allowed you to test IAP in the simulator - but that is the rare gift rather than something to be expected.

This has changed this year. See documentation here: https://developer.apple.com/documentation/storekit/in-app_purchase/testing_in-app_purchases_in_xcode?language=objc