Hi, I am testing an consumable in-app purchase for my app on an iPad, whenever I select to purchase, it always shows "For testing purpose only. You will not be charged for confirming this purchase.". Then I touch the blue Purchase button. It instantly shows "Done", then alerts "You're all set. Your purchase was successful. [Environment: Xcode]. It never asks me to enter a Sandbox account.
I followed the instructions on "Testing in-app purchases with sandbox" page, but I can not find the sandbox account in Settings > App Store.
I expected to see [Environment: Sandbox] so I could get the transaction id for App Store Server API.
My iPadOS version is 17.4.1. My Xcode version is 15.1 and I use StoreKit with SwiftUI view.
Can someone please shed some light on why I always get [Environment: Xcode]? I googled a lot, the process to test with Sandbox seems to be straightforward, But I just could not get it right.
Thank you very much!
KInd Regards, Shih-Chin Yang
Hi, I just figured out what was wrong with my setting. I used a StoreKit configuration in my project's scheme. Once I set it to None, I was able to test with a Sandbox account. Hopefully this helps someone who would have the same issue as mine. Cheers! I just wanted to mark this question as "Answered".