Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 13 - How to login in in-app purchase Sandbox account?

In order to test my in-app purchases with iOS 13 I have to update one of my test devices to iOS 13.1 beta.

On iOS 12 and before there was a special Sandbox login in Settings/iTunes & App Store/Sandbox Account:

However, after the update to iOS 13 this section is missing. I tried to follow the instruction in the answer to a similar problem on iOS 12 but nothing worked. I completely reset the device and logged out both at Settings/iTunes & App Store and at Settings/Apple ID, so currently the device is not connected to any account (real or sandbox). At least as far as I can tell.

I have re-installed my app on the devices using Xcode 11 beta and tried to perform an in-app purchase. The store shows a login prompt which shows that this is a Sandbox purchase. However, the prompt only asks for the password, not for a username or Apple ID. So I have no idea which account should be used here.

When using the password of a newly created test user account the password is not known. I can use the password of my real Apple ID account which was used during the device setup and was then disconnected.

So, how to connect to a specific Sandbox account in iOS 13?

like image 458
Andrei Herford Avatar asked Sep 09 '19 08:09

Andrei Herford


People also ask

How do I log into sandbox on my iPhone?

Sign In to the App Store with Your Sandbox Apple ID In iOS and iPadOS, the sandbox account appears in Settings > App Store after the first time you use the device to attempt a purchase in a development-signed app. There's no need to sign out of the non-Sandbox Apple ID. Sign in using a Sandbox Apple ID.

How do I use Apple ID sandbox?

Create a Sandbox Tester AccountUnder Sandbox, click Testers. Click “+” to set up your tester accounts. Complete the tester information form and click Invite. Sign out of your Apple ID on all testing devices and sign back in with your new sandbox tester account.


1 Answers

Here's what worked for me (on a dedicated development iPhone 6s running iOS 13.3).

  1. Sign out of iTunes & App Stores
  2. Sign out of iCloud
  3. Run app on device, and click to purchase an item.
  4. When prompted for an ID/Password, enter the Sandbox Tester credentials.

It took entering the credentials a couple of times, but the In App purchase dialog alert did say the environment was Sandbox.

After it "made good" (that is, stopped asking me to log in and processed the SKPaymentTransation), I was able to go to iTunes & App Stores in the General Settings, scrolled to the bottom, and now the Sandbox Account appears with the tester account showing.

Now when I run the app and click the button to purchase content, it just asks for the tester password.

Hopefully this helps others.

like image 101
Tim Newton Avatar answered Nov 07 '22 11:11

Tim Newton