StoreKit Testing Not Working for Existing macOS App. Receipt Validation Fails and gives me App Sandbox Receipt

I tried adding StoreKit testing for an existing macOS app. On first launch, there is no App Store receipt on the main bundle and therefore my app calls exit(173) to get a receipt, and I get an App Store sign in sheet. Then when I sign in, I have a receipt that does not validate. I believe I'm simply getting an App Store receipt in the sandbox environment? I was under the impression that using StoreKit testing would allow me to test iAP in a local environment.

Here is my steps to reproduce:

1) Added the Configuration.storekit file to my project.
2) Set this file as the storekit configuration in the scheme editor.
3) Run the app.
4) Local receipt validation fails, macOS gives me a Mac App Store login prompt, which I can use but then I get a sandboxed App Store receipt on the main bundle. Receipt will not verify against StoreKitTestCertificate.cer.


I'm running Xcode 12.3. I'm on Big Sur. My app's deployment target is 10.11.

Any ideas? Thanks

This apparently hasn't changed. Xcode 13.2.1 receipt validation fails when I try to verify against the generated public certificate from the StoreKit configuration file. Receipt validation passes when I validate against the Apple root certificate...but then I'm in the sandbox environment and lose the benefits of StoreKit configuration testing.

Here's my Feedback number on this: FB8974649

StoreKit Testing Not Working for Existing macOS App. Receipt Validation Fails and gives me App Sandbox Receipt
 
 
Q