Trouble Testing IAP with Sandbox

I am running Xcode 14.2 and attempting to test on a developer-signed physical device (iOS 16.1.2). Following the steps in Apple documentation ("Setting up StoreKit Testing in Xcode"), I have been able to run tests using using local StoreKit configuration file. All works well. I next wanted to try to use Sandbox Testing. Following the same documentation,

  • I set up a Sandbox Tester in Apple Store Connect.
  • I saved a Public Certificate from the storekit configuration file in the project.
  • I removed the local StoreKit configuration file from the scheme’s run options (by setting to "none").
  • I added the following conditional compilation block to my store manager:
    let certificate = "StoreKitTestCertificate" 
#else
    let certificate = "AppleIncRootCertificate" 
#endif

It is my understanding that an option to sign in with the SandBox ID should appear in device's App Store Settings after the first time I attempt to make a purchase when running on the device physically connected to my Mac. This is not happening. Am I missing a step? One possible mistake I made was placing the (above) conditional compilation block in the wrong place. Can someone recommend the best place for this? The documentation says to paste it in with my receipt validation code. Another suspected oversight might be something else I need to do in Apple Store Connect. Not sure. Any help appreciated!

Addendum:In the console I get Error enumerating all current transactions: Error Domain=ASDErrorDomain Code=509 "No active account" UserInfo={storefront-country-code=USA, client-environment-type=Sandbox, AMSServerErrorCode=0, NSLocalizedDescription=No active account}

Addendum -- In the console I get this: Error enumerating all current transactions: Error Domain=ASDErrorDomain Code=509 "No active account" UserInfo={storefront-country-code=USA, client-environment-type=Sandbox, AMSServerErrorCode=0, NSLocalizedDescription=No active account}

UPDATE: I've viewed a WWDC22 video ("What's new in StoreKit testing") which says to create a second storekit configuration file syncing it with the in-app purchase defined in Apple Store Connect. The new read-only file is indeed syncing; but, it is STILL NOT WORKING.A print statement to the console, says that, in sandbox mode, requestProducts() in the Store manager is unable to find any products (though it works as expected when the scheme is reading either of the local store kit config files).

Trouble Testing IAP with Sandbox
 
 
Q