Cannot test in-app purchases in Xcode 9 for macOS app
Asked Answered
H

1

1

As of the release of iOS11 it has been a pain (if not impossible) testing in-app purchases. While I've found a great workaround for testing on iOS here: https://mcmap.net/q/389011/-ios-11-is-in-app-purchase-testing-using-a-sandbox-user-keeps-asking-to-sign-in-for-anyone-else-too-forever-loop I could not find anything for macOS apps.

Hamo answered 5/10, 2017 at 18:52 Comment(0)
H
5

So here is what I did that kind of does the same as with the iOS workaround:

  1. In the App Store app Sign Out of your account (Store/Sign Out)
  2. In iTunes Connect create a brand new Tester
  3. Restart your computer
  4. Open your Xcode project
  5. Build & run
  6. Click on your Buy button to start a purchase
  7. Sign in with your newly created test account

Sign in

  1. When prompted to Change the store click on Cancel

Click Cancel

  1. Click on your Buy button to start a purchase again and the correct Buy Alert will pop up; finish the transaction by actually making the purchase

Click Buy

Done! Hours of frustration saved! Thanks Apple :[

Hamo answered 5/10, 2017 at 18:52 Comment(2)
I am converting my application form iphone to macOs. subscription is working on the iphone fine but when i test the sample bundleID on macOs then subscription is done..but receipt is not fetched from the appstore. when i relaunch application then user is not premium because receipt is not found. application is not able to download the receipt. can you please let me know what i am doing wrong.Kataway
Unfortunately step 7 (sign in) does not happen to me, even though I logged out of the App Store and restarted. For me it goes straight to "Account Not In This Store" after clicking "buy". Any idea?Subsoil

© 2022 - 2024 — McMap. All rights reserved.