I plan to use the new AppTransaction.shared API in StoreKit2 to find the user's original purchase date and version for my macOS app. However, when testing this by running my app with the Xcode debugger, the app shows up with an App Store login prompt, asking for my login and password, which is undesirable for the user. The WWDC22 presentation "What's New with In-App Purchase" mentions that "StoreKit takes care of automatically updating the App Transaction when necessary", so I assumed this wouldn't be necessary.
I wanted to know if this is just a sandbox quirk, or is the "AppTransaction.shared" API supposed to trigger this prompt for all users, even in production? In that case, is it like the old "Refresh receipt" API where we shouldn't trigger this automatically when a user opens the app, and instead have a button somewhere that triggers the call? Thanks.
You may want to check your sandbox user is all set up in Settings-> App Store. It should not be prompting unless you use AppTransaction.refresh() which will always prompt the user for a password.