I am trying to test a non-consumable in-app purchase in the Apple sandbox using a development-signed, sandboxed macOS app. The app is launched from Finder rather than from an Xcode scheme. A purchase attempt instead produces a transaction that my diagnostic build identifies as an Xcode test transaction.
- macOS 27.1; Xcode 27.2 (27B52).
- StoreKit 2; native Swift code called by an Electron macOS app.
- The app has an Apple Development signature and a development provisioning profile that includes this Mac.
- The app uses a fixed app bundle ID and a non-consumable product ID configured in App Store Connect.
- After I removed the app’s existing test transaction in Xcode’s transaction manager, the diagnostic app found no current entitlement for the product.
- I attempted a purchase from the Finder-launched app. There was no Apple account login or purchase confirmation prompt. A new transaction appeared in Xcode’s transaction manager, and the app returned its own
verificationFailederror. - The diagnostic build later found a verified current entitlement for this product and app bundle whose
Transaction.environmentwas.xcode. The app intentionally rejects Xcode test transactions for production entitlement access. - I quit Xcode and launched the app again from Finder. After removing the app’s test transaction, the same result occurred on another purchase attempt.
The app’s verificationFailed label is used both when StoreKit returns an unverified result and when my own transaction acceptance checks reject it. Therefore, that label alone does not prove that StoreKit signature verification failed. I have not confirmed an actual Apple sandbox purchase or restore.
Earlier automated StoreKitTest work on this machine used the same app product identifier; the current tests use a separate test-only identifier. I do not know whether the earlier tests are related. I do not yet have a focused minimal reproduction project.
The app checks the product ID, app bundle ID, non-consumable type, and revocation date; in builds without the test-only flag it also rejects .xcode transactions. Its diagnostics iterate Transaction.currentEntitlements and report .xcode only for a verified matching transaction.
- What determines whether a development-signed macOS app launched outside Xcode uses Xcode StoreKit testing or the Apple sandbox?
- What non-destructive checks can identify any remaining Xcode/StoreKitTest configuration associated with this app or process, without deleting unrelated apps’ transactions or resetting shared test data?
- What is the recommended way to transition this app to an Apple sandbox account and confirm the transaction environment before testing purchase and restore?
No account details, receipts, certificates, provisioning profiles, user files, or transaction identifiers are included. I can provide a focused reproduction or additional diagnostics if needed, after preparing them.