59

Trying to do some In App Purchase testing, so I created a sandbox tester on itunesconnect... but when I attempt to log in as that user on my device I get an error:

Itunes Account creation not allowed

The Apple ID cannot be used with the iTunes store at this time. Please try again later.

If I put in the wrong password for the account I get an account rejection so its not a password typo.. this is happening for every test account I create... anyone have a clue what the hell is going on.. I cannot find any information on this anywhere.

Ahmad F
  • 30,560
  • 17
  • 97
  • 143
Speckpgh
  • 3,332
  • 1
  • 28
  • 46

8 Answers8

93

Yes, the answer is I AM AN IDIOT... pure and simple.

I was setting my user account in itunes login to these test accounts.. which invalidates them as test accounts because they try to legitimately log into itunes...

You have to have your ITUNES/APPstore login EMPTY, do not try to log in explicitly in the settings... LOG OUT of ITUNES/APP STORE so that no account is in the apple ID in settings and then just run your app & login the test account via your app.

I had properly done this, but then without reconsulting the documentation I went to change users, and saw that I had a test user in the UI of the settings (I guess it gets set by the software) so I attempted to just set it there, and was invalidating the accounts causing this problem.

This is purely my mistake, but Apple could do a better job on the error this thing throws, and have the app store/itunes perhaps display something other than the test id, so if its been a week since or two since you set your test id and go to change it you don't just foolishly think you do it that way...

Anyway... you will likely need to delete all your sandbox testers if you did what I did as they will be invalid and then create new ones... and then remove the appstore/itunes login on your test device and try to run it....

I admit this is documented, I did follow it the first time I used a test user, but forgot the next time I wanted to test.. which lead to this... fully my fault.. but I suspect I am not, nor will I be the only one to do this... which is why it's so odd I couldn't find anything else documented about this error anywhere.

Documentation for reference:

luke77
  • 2,255
  • 2
  • 18
  • 30
Speckpgh
  • 3,332
  • 1
  • 28
  • 46
  • Can you post a link to the documentation where this is outlined? I was following this Unity tutorial which produced the same error you had: http://docs.unity3d.com/Manual/UnityIAPAppleConfiguration.html – Jamaal Jul 01 '16 at 03:03
  • See link, added to answer above – Speckpgh Jul 01 '16 at 03:09
  • 3
    Yes, right, thank you, I made this mistake. To clarify: On your device, go to Settings > iTunes & App Store. Then sign out. **Do not sign in again.** Leave it blank, displaying a "Sign In" field prompt. Run your app via Xcode on your device. When accessing the fake App Store, a “Sign In to iTunes Store” dialog appears for you to enter the fake Sandbox User email address and password. – Basil Bourque Aug 08 '16 at 01:50
  • I did the same steps, logged out of itunes store. Whenever I build the app on my device and click the item to purchase, I'm not even prompted to login, I am getting 'invalid product' response. Appreciate any help. – elias Oct 22 '16 at 08:09
  • 2
    But what should i do for testing Apple pay.. in case of apple pay.. you need to login first there, as documented here: https://developer.apple.com/support/apple-pay-sandbox/ – Mehul Thakkar Oct 24 '16 at 09:51
  • Thank you for posting clarification on this! I like how it's 2018 and the sandbox docs still say "Sign out of your Apple ID on all testing devices and sign back in with your new sandbox tester account." That should be reworded! – Desmond Apr 11 '18 at 21:55
  • @MehulThakkar did you ever find an answer? Same boat, trying to figure out how to test Apple Pay on simulator. I really hate Apple, and now that my developer license expired and my company went out of business, I can admit it... NDA be dammed! – eselk May 25 '18 at 00:48
  • 1
    @eselk: Yes i am were able to test it on simulator. check the link that i shown over here... and go through each step. Hopefully that helps you. All the sandbox credit card given at above link is not working. you need to try each and every sample credit card.. you will find anyone working in list. – Mehul Thakkar May 25 '18 at 10:40
  • @eselk: check my question and answer at https://stackoverflow.com/questions/39515789/apple-pay-sandbox-tester-not-able-to-login-into-device-ios-10/40216375#40216375 – Mehul Thakkar May 25 '18 at 10:42
  • how can i cancel my subscription from sandox tester account, because when i try to view account, it gives me error not allow to view the subscription, how can we check cancel subscription scenario? can you please help me. – Parth Mehta Jul 18 '18 at 06:22
  • 1
    Not your fault. Apple's App Store API sucks. I have been using it since the beginning and in all these years it didn't improve one bit. It's always a game of guessing. Just because something is "documented", it doesn't make it ok. The whole "user invalidation" is dumb and it should have been gone by now. – kontiki May 09 '19 at 06:18
  • @Desmond doc updated on https://developer.apple.com/documentation/storekit/in-app_purchase/testing_in-app_purchase_transactions – Cœur Feb 22 '20 at 15:05
8

In my case, just log out your real Apple ID, don't login sandbox tester Apple ID, then run your App, buy product, and system will showing a alert view to let you choose "Use Existing Apple ID" or "Create New Apple ID", of course choose first one, then login your sandbox tester Apple ID, and it's done.

Meilbn
  • 582
  • 7
  • 8
8

Answer 2020

If your iOS is after 13, now go to Settings -> iTunes & App Stores at the bottom you will see a section called:

SANDBOX ACCOUNT

this is the place where you can log in your tester accounts

below screenshot shows where it is:

enter image description here

Sky
  • 2,212
  • 3
  • 14
  • 22
  • Related doc: https://developer.apple.com/documentation/storekit/in-app_purchase/testing_in-app_purchase_transactions – Cœur Feb 22 '20 at 15:07
  • I'm so glad Apple added this feature. – Clifton Labrum May 29 '20 at 02:11
  • 12
    What if I don't see that section on my device? I have iOS 13.4.1. – Carolus May 29 '20 at 12:34
  • 2
    Can't find it on iOS 14 – Dpedrinha Mar 16 '21 at 22:27
  • If you do not see the option to add a sandbox account under iOS settings, make a sandbox purchase in your app. Apple will show a popup to enter login details, then you will see your account in iOS settings. – Debashish Das Jul 26 '21 at 13:14
  • This answer definitely works but if you're on iOS 14 or higher go to **Settings > App Store > bottom of page**: https://developer.apple.com/forums/thread/661730. If you don't see it than (1) go to your app and try to make a purchase using your sandbox email, it will fail. Afterwards (2) go back to **Settings > App Store** and it should be at the bottom of the page. If it still doesn't work then read my next comment below – Lance Samaria Sep 25 '21 at 17:57
  • If it still doesnt work you may have to (1) sign out of your device **Settings > Apple Id/iCloud/Media & Purchases > Sign Out** (2) while still signed out try to make the sandbox purchase from your app with your sandbox test email (it will fail), then (3) sign back into your Apple account with your real info **Settings > Apple Id/iCloud/Media & Purchases > Sign In**, then go to **Settings > App Store**, it should be at the bottom of the page. https://stackoverflow.com/questions/57850713/ios-13-how-to-login-in-in-app-purchase-sandbox-account/59278205#59278205 This is a ALOT of unnecessary work – Lance Samaria Sep 25 '21 at 18:07
1

A simple solution could be to just reset your iPhone, then the sandbox iap account will be enabled to be added. Maybe it's Apple's bug.

Erik
  • 2,316
  • 9
  • 36
  • 58
Shuangquan Wei
  • 121
  • 1
  • 3
0

Must be a bug in their system. I am testing out subscriptions and I am able to add a 1-month sub / 7-day trial, and I get the same message when I try to view the account (so I can manage the subscriptions). Other times it will just show a regular subscription message (not showing the 7-day trial message).

I am however, still able to get this sandbox account subscribed and the app responds correctly.

These "Sandbox" account still need to be an actual working iTunes account with a credit card attached. I figured this was the reason I was seeing the error, but after setting up and verifying this test account, I still see the error.

I believe it to be a bug in their system as they start to implement the new subscription system. If anything, contact the Developer Tech support to see what they say, but they will never tell you its a "bug" in their system.

WrightsCS
  • 50,551
  • 22
  • 134
  • 186
  • 1
    I have reported my error to support. itunesconnect tells me the accounts did create fine at there end but they can't see the iTunes data so contact iTunes support. Contacted them they are looking into it but no resolution yet and just suggest I report it to dev programs support. Which I just did. It's clearly something wrong on their end but I have been unable to do any development work for days now because of this. I have to pay to be a developer and the. I can't develop. This needs resolved – Speckpgh Jun 30 '16 at 01:18
  • You should still be able to make the subscriptions. While annoyed and in the same situation, I am still able to work around the issue. Just delete the app and try subscribing again. You should be getting the message that you have already subscribed. Also remember that subscriptions are on an accelerated time frame for development. I am seeing around 5 minutes and the subscription expires. – WrightsCS Jun 30 '16 at 02:14
  • Not really sure how, as I cannot log into the device as the test users, so if I subscribe its with a production user and my CC will be charged. – Speckpgh Jun 30 '16 at 15:12
  • @user282172 I'm having the exact same issue as you, did you find a solution for this? – Jamaal Jul 01 '16 at 02:53
0

Another reason happened to me is that I (was unaware and) tried to use sandbox tester on app that downloaded from app store, which is signed with store release credential.

Looks like sandbox tester will only work with app signed with development profile or test flight.

Correct me if someone can use sandbox tester on store-downloaded app.

Wappenull
  • 1,181
  • 13
  • 19
0

I had this problem as well, the simple solution was to sign out of my iTunes account on my physical device, restart it, clean the project and then build and run as normally. Only sign into your test iTunes account after the restart once the project is running. This issue may be caused by the way in which Apple handles or cashes users iTunes accounts on a device.

Luke Pearce
  • 133
  • 1
  • 3
  • For iOS 12 and later, you may not need to sign out according to https://developer.apple.com/documentation/storekit/in-app_purchase/testing_in-app_purchase_transactions – Cœur Feb 22 '20 at 15:04
0

In sandbox user provide valid username and verify it then login , It will only work after email verification

Abeer Iqbal
  • 1,256
  • 10
  • 10