WatchOS 6.2.6 - Can not test sanbox In-app purchase with independent app

Hi guys,
I have problem when test in-app purchase sanbox in independent WatchOS application
Enviroment: Xcode 11.5 and WatchOS 6.2.6 - Swift UI project

The problem is when i call function buy the product, the WatchOS (both simulator and real device) alway shows message: unable to purchase app sign in with your apple id from the apple watch app on your iphone.
  • I tried to build and test in TestFlight mode also, its same result.

  • Changed AppleID in Iphone (pairing with watch) but its same result too.

  • When debuging In simulator and device, i can get informations about IAP packages (include price and description) created on the Itune connect

Anyone meet the problem before, please help me resolve it.
Many thank !
To test In-App Purchases through sandbox on watchOS make sure you are signed in to a sandbox account on your phone Settings -> App Store -> Sandbox Account.
Had the same issue. Tried a lot of different combinations (like 4 hours of attempts across a week and even rebuilt my app to a new App ID / App Store Connect setup). This is what I think enabled the sandbox user for me though it could be an unstable sandbox / appleid system so I'm not sure:

sign-out of apple id on phone
create a new sandbox user in itunes connect (set location to US, for me it refused to accept a UK store and you can't change a sandbox user once its created and note at this point it'll email you to verify the account, but you can't accept as its not a proper itunes account)

Next sign-in via the Settings->App Store->Sandbox Account as the sandbox user, reboot the watch just in case and then try the payments and for me it still gave the dreaded "unable to purchase app sign in with your apple id from the apple watch app on your iphone". At this point I think normally this is all you'd expect to do for iphone apps but something about watchos seems to reject the sandbox user...

Now on iphone sign-in to the Apple ID as the sandbox account + verify the email using the code (the docs will tell you to never do this as the sandbox user is now a full itunes account but this is what worked for me).

Reboot the watchos. Retry the payment and you'll get the same error.

Now sign-out of the apple id but keep the Settings -> App Store -> Sandbox account set to this account. Reboot the watchos.

Then you should be able to make a payment (it'll prompt you to setup a passcode during this process).

Mercifully the storekit configuration works fine for local debug but yeah, normally you want to sandbox or testflight to test a full integrated flow at some point. (I have no idea how to get testflight working, like you say I tried that and it doesn't seem to work with watchos)

good luck! (am hoping the receipts are going to be sandbox verifiable, not got that far yet)

I've seen testflight working now on the latest watchos 8 beta but if your apple account is outside of the US you might see this:

your account is not valid for use in the U.S. store. You must switch to the U.K. store before purchasing.

It seems for some reason the watch is locked against the U.S. store even though my apple account, sandbox and testflight are all set to UK.

I had to create a sandbox account set to the US, sign in with that on the phone, app store and app store sandbox then the purchase completed ok.

WatchOS 6.2.6 - Can not test sanbox In-app purchase with independent app
 
 
Q