24

I was watching this WWDC18 talk, and they've explicitly announced that they'll allow developers to simultaneously connect one Sandbox Account for IAP testing - when in Developer Mode and in iOS12.

Screenshot of the moment that they show the feature

Straight to the question:

I've tried to access it from both my iPhone 6S and iPhone X - both on iOS 12 -, but neither had this option at the end of the screen. Also, I've searched about this topic, and no one seems to be addressing this issue.

The "Apple ID > iTunes & App Stores" on my device

This feature is incredible because it removes the need to logout of our Apple ID - which is/was a tremendous pain.

Test note: I've tried to change Regions and Languages on my devices - both unsuccessful.

Guilherme Matuella
  • 1,630
  • 1
  • 13
  • 26
  • You usually log into a sandbox account from the app. Try creating a sandbox user, signing into it through the app, and go back to settings to see if it's there. – EmilioPelaez Nov 01 '18 at 18:23
  • Yeah, that's how I always did pre-iOS 12, but with this new feature, I should be able to register a sandbox account **without** having to logout from my Apple ID. But I haven't tried to input the sandbox data to see if it enables on this new Device, I will check. – Guilherme Matuella Nov 01 '18 at 19:05

3 Answers3

24

Just tried it now on iOS 12.0.1.

  1. In Settings > Apple ID > iTunes & App Stores, click on your Apple ID (at the top of the page; it's hyperlinked). Then, select "Sign Out".

  2. As far as I understand, you are now still signed into your Apple ID for various services like iCloud and Game Center. This is fine.

  3. Open an app that is not signed for release (e.g. an app that you are developing IAPs on).

  4. Try to complete an IAP (restoring purchases, or just getting the app to request your receipt, will also suffice); this will prompt the iTunes Store to ask for your login details again.

  5. The login alert is simply entitled "Sign In to iTunes Store", and prompts you to enter an Apple ID and Password. Do not enter your personal Apple ID here; instead, enter a sandbox account's username and password.

  6. In my case, I had initiated an IAP transaction, so I received an alert entitled "Confirm your In-App Purchase" with details of the IAP and the text "[Environment: Sandbox]"; confirm the purchase by entering your sandbox account's password.

  7. I then received an alert entitled "Sign in to iTunes Store", this time explicitly asking me to enter the password for my sandbox account.

  8. I returned to Settings > Apple ID and tapped iTunes & App Stores. This produced an alert saying words to the effect of "It appears that you are using [your personal Apple ID] in the Game Center; is this the same Apple ID that you want to log into iTunes with?". In this case, you should click 'Continue'. It will take you to the iTunes & App Stores screen. Note that I did not have to enter the password nor re-specify the Apple ID for this step!

  9. On the iTunes & App Stores screen, your personal Apple ID will be indicated at the top of the screen as before. At the bottom of the screen, you will find that the Sandbox Account field has appeared!

This process could have done with some better documentation to accompany the hype, but unfortunately this is just "business as usual" for iOS development.

Jamie Birch
  • 4,408
  • 1
  • 32
  • 50
  • Currently I don't have access to the application that I've these SKProduct buy tests, but until tomorrow I'll check it, then I'll give you a feedback if it worked as intended. – Guilherme Matuella Nov 08 '18 at 12:08
  • 1
    That's exactly it. Just logging out, entering the credentials once, and then logging in again with the iTunes & AppStore did the trick. What's even better: you doesn't even need to complete a SKPaymentTransaction, just entering the credentials once (and seeing the Sandbox environment) should be enough - so you can cancel the payment or whatever. I believe this is a bug, because this is not intuitive at all. – Guilherme Matuella Nov 14 '18 at 17:02
  • That did it for me! Thanks a lot. It asked for my credentials a few times after that for some reason, but going in the settings and entering my real credentials there again worked. – enyo Jan 29 '19 at 10:53
  • This is a fantastic flow — only nine simple steps needed. Luckily we all know our sandbox IDs and passwords by heart so it's fine that you can't switch apps while being prompted for the credentials. – Andreas Jul 18 '20 at 21:57
8

iOS 12.1.2 seems to have simplified the process even further than Jamie's steps without the need to sign-out of anything:

  1. While still signed into your phone with your personal Apple ID, open a development app (NOT signed for release)
  2. Try to complete an IAP, which brings up the iTunes Store login page
  3. Use your sandbox ID here (NOT your personal Apple ID)
  4. You may have to log in twice (another popup asks for just your password)
  5. The sandboxed purchase should go through
  6. Going to Settings > iTunes & App Store and scrolling to the bottom now shows a new Sandbox account that says "This account will be only used for testing your in-app purchases while developing locally. Your existing App Store account will be used for TestFlight apps."

That last bit about TestFlight apps is different than the OP's screenshot. Perhaps this method ONLY sets up the account for development IAP testing, whereas the full sign-out method sets up the sandbox account for more.

user3352870
  • 91
  • 1
  • 5
-2

If you can't find [Sandbox account] in "Settings", firstly, enable location service in [Privacy] section, then, check [Date & Time] is set automatically.

Jagie
  • 2,084
  • 3
  • 26
  • 25