Apple Verification Email requested for Sandbox Tester User ID - ios

I'm having a problem getting the Test User sandbox IDs I've created in iTunesConnect to purchase a non-consumable product. I wait a day after I create the IDs before trying to use them. First, I make sure no ID is signed in according to Settings/iTunes & App Store on the device. Then, when I run my app in Simulator on a real device and click my Buy button and sign on with a Test User ID, I get a popup saying the ID must be verified and that a verification email will be sent if I click the Verify button. Now, I know I should not verify a Test ID (because according to this SO question/answer, that action turns the ID into an actual account). I'm also given the option to Ignore the verification -- if I click that, nothing happens -- I'd expect the purchase process to continue, but it doesn't. Yes, of course, I'm running the simulation on an actual device. And, though I start out with no ID entered in Settings for iTunes/App Store, when I go back after receiving the above, my own Apple ID now appears as signed-in! Could this have something to do with my activating Apple's Two-Factor Authentication? I just turned that on last week.

I have finally got iTunes Connect sandbox users to work. In order to do so I had to verify the sandbox user's account and hence needed a valid email address to do so.
Steps highlighted at the end
This goes against how I had always created and used sandbox users from day 1, but either there's been an undocumented change or is the current hack for the current iTunesConnect server maladies.
I can confirm that the receipt generated is a sandbox receipt.
The user is a sandbox user.
I have not entered nor paid with a credit card.
Steps to solve
Go to iTunesConnect -> Users & Roles -> Sandbox User and add a new user
Use a valid email address. Tip: A real gmail account and the + symbol can generate many valid emails. i.e. jon.doe+1#gmail.com, jon.doe+2#gmail.com etc where jon.doe#gmail.com is a valid gmail account.
Wait for verify email from iTunes.
Verify the sandbox user by clicking on verification link. Tip: Use incognito browser to keep your real and sandbox Apple sessions separate.

Related

Reset "Sign In with Apple" to the initial create account state

I am implementing Sign In with Apple and basically everything works, I don't need help with that. However, while testing my implementation, I want to reset back to before the first time I used Sign In with Apple, where it asks you if you want to create an account, and asks for the name and email address. Like this:
After you signed in that first time and then sign in again, it only asks if you want to sign in using your Apple ID, but skips the requestedScopes. So, how can I go back to that first state where it does ask for the requestedScopes info, like name and email?
Reinstalling the app didn't help.
You can revoke the app's permissions for your apple ID in your phone/simulator settings. I've attached the steps where you can find everything.
iPhone Settings, select your Apple account.
Password & Security
Apps Using Your Apple ID
Your app/app bundle ID
Stop using Apple ID

Cannot get name & email with sign in with Apple on real device

So I'm implementing sign in with Apple, everything goes well on the simulator, I request email, fullName scopes, the authenticate UI shows, and I can get the data, as images shown below:
But when testing on real device (iPadOS 13, iPad 2018), the UI didn't show (it does not asks for name and email on the UI), and I can't get the email, fullName from the response, and I can also confirm that the authorizedScopes are empty, I can only get the user identifier
I believe this is a bug and will file a radar, also posted a discussion on the Apple developer forum (but they usually won't approve my post, I don't know why)
If this is not a bug, can somebody tell me how to fix this?
Thanks
Problem solved! tl;dr
This is an expected behavior
Answered by Apple Engineer
(Original post link: https://forums.developer.apple.com/thread/121496)
Hi aslkdjalksdjasdasd,
This behaves correctly, user info is only sent in the ASAuthorizationAppleIDCredential upon initial user sign up. Subsequent
logins to your app using Sign In with Apple with the same account do
not share any user info and will only return a user identifier in the
ASAuthorizationAppleIDCredential. It is recommened that you securely
cache the initial ASAuthorizationAppleIDCredential containing the user
info until you can validate that an account has succesfully been
created on your server.
Patrick
2019/12/15 Edit
This behavior is also documented on Apple's Sign in with Apple doc, check the documentation.
Ensure that your app relays the credentials and user information to your app servers.
The API collects this information and shares it with your app the first time the user logs in to the app using Sign in with Apple. If the user then uses Sign in with Apple on another device, the API doesn't ask for the user’s name or email again. It collects the information again only if the user stops using Sign in with Apple and later reconnects to your app.
If someone fails in storing "user email", "first-name" first time, then he should follow the following steps:
iPhone Settings -> Apple Id -> Password & Security -> Apple ID logins -> {YOUR APP} > Stop using Apple ID.

How to add to iTunes Connect users, when phone number is Apple Id

One of our testers have their phone number as their Apple Id instead of an Email Id. This person doesn't have an Email Id signed in his phone.
But when I go to Add App Store Connect User, there's only a field to enter Email Id? Does he have to sign out and create an Apple Id with an Email Id?
I need to add this person to TestFlight.
You can invite a TestFlight user using any email they have access to. You don't need to invite them using their Apple ID email.
The invitation email will contain a code that they redeem using the TestFlight app. Once they redeem the code it is linked to the Apple ID that is currently logged in to the App Store on their device.
If your tester doesn't have access to any email at all then you can send the invitation to an email you have access to and then get the redemption code to them some other way; text message, owl post etc.
To add an external tester without adding them as an AppStore Connect user:
Go to "Test Flight" in App Store Connect
Create a new group by selecting "New Group"on the left
Select your new group and then tap "+" to add a tester.
Enter their name and email address
To allow an external tester to test your app you will need to submit it for beta review;
Select your build in Test Flight
Add your group or individual tester
Submit for review and wait for approval (typically less than a day or so)
Subsequent builds in the same version don't need to go through review, but subsequent versions will.

Change the password of “Sandbox Tester” user account on iTunesConnect

To test In-App Purchase features in an iOS app, we need fake user accounts on the fake App Store. Such accounts are defined on iTunes Connect > Users And Roles > Sandbox Testers web site. I see how to create such users on that web page, by clicking the + (Plus sign) inside a circle icon.
How do we reset the forgotten password on that account?
You absolutely can change the password for sandbox users. Go to iforgot.apple.com
Enter the sandbox email address. Either answer your security questions or have it send you an email.
You can't. You just need to delete that user and add another on with a new email.

Adding Sandbox Tester in iTunes Connect with an existing Apple account

I'm trying to add sandbox testers in iTunes Connect. But I'm getting this error:
The email address you entered already belongs to an existing Apple account. Please try again.
My question is how can I add sandbox testers with existing Apple ID accounts?
Update by Dimitar Nestorov May 2021
I just tried the sub+email trick and it works again.
(Not confirmed by OP)
Update June 2020
So Apple has decided in their infinite power trip to no longer allow the previous sub+email trick to work.
Big thank you to Josef Grunig in the comments for pointing out a new workaround, at least in Gmail.
You can still use the "." trick with gmail accounts: name.surname#gmail.com or namesurname#gmail.com without dot is the same account for Gmail while they are different for Apple Sandbox. Just tried and it worked.
This will allow you to have "multiple" email accounts all going to the same email, since you can put the "." anywhere in the email string before the #.
Example:
s.tandardappleid#apple.com
st.andardappleid#apple.com
sta.ndardappleid#apple.com
stan.dardappleid#apple.com
and so on, and Apple hopefully won't be able to kill this workaround since periods are allowed in email addresses normally.
If any other email providers allow this kind of functionality then feel free to include it in the comments.
The following has been left for historical record
Currently you cannot. The closest you can get is to use an email sub+address, if your email allows it. Gmail does for sure, others probably do too.
So if your normal itunes email is email#gmail.com, then you could set up a sandbox user like email+ios1#gmail.com and then do all the email confirmation and stuff in your normal inbox. This is useful because you don't have to create actual brand new address for the sandbox account.
This is still a huge pain though because itunes sees it as a seperate, unique account from your normal itunes account, and so if you want to try out the sandboxed app, you have to log out of itunes, log in with the new sub addressed account, and then when you are done testing you have to log out of the sub account and log back in with your normal account to have access to all your other apps.
Update April 2017
So I contacted Apple developer support, and after finally getting through their horrible Contact Us system, I got this reply back:
Thank you for reporting your sandbox issue.
Aliasing for sandbox testers is allowed if the main email is already registered in our system as being only a sandbox Apple ID.
The following is an example.
If standardappleid#apple.com is already registered as a regular account, you can not add standardappleid+alias#apple.com as a sandbox tester.
We will not be able to fix this for you as it is expected behavior.
I know it was working with normal apple id email addresses in Feb 2017. So now it looks like you'll have to have one address that is not associated with any Apple account in order to use sub addressing.
EDIT
Just to clarify a little more. If you use email#gmail.com as your main apple id, you can no longer use any variations of it with sandbox testing accounts.
Instead, Apple wants you to make a complete new and unnecessary email account such as email1#gmail.com that hasn't been used as an apple ID, and THEN use that one as your base email for the subaddressing. So once making email1#gmail.com, you could register email1+ios1#gmail.com, and email1+ios2#gmail.com, etc.
The errors
The email address you entered already belongs to an existing Apple account. Please try again.
and
An unknown error has occurred.
and
An error has occurred. Try again later.
are equivalent.
It means that your email address is not accepted. The email field may also be highlighted red when the error message is shown.
Apple blocks these email addresses (this is undocumented):
Existing Apple accounts
Existing Apple accounts with the Gmail + trick added to the sandbox user account
Mailinator
Mailinator alternate domains
Other, undocumented stuff
I'm just going to post the real solution here, since this is what other people are wanting to know:
ANSWER
Login to MyDomain, or GoDaddy or whatever you use to manage your personal domain (if you don't control any domains you can turn in your nerd card now)
Create a new MX record for anon.yourdomain.com and point it to mail.mailinator.com. Or, possibly, realize that you already did this a while ago for some previous reason
Register the sandbox with some email like appleserrormessagessuck#anon.yourdomain.com
Then you're done
I fixed this by creating a brand new (free) Google account myappsandbox#gmail.com and adding that as a new sandbox tester. This makes a new Apple ID for that email address. It's a pain but it worked.
My problem was the password (at least 1 capital letter, 1 number and 1 punctuation char)
If you own a domain and can configure your mail server, many of them allow you to set a "Catch-All" mailbox that receives the e-mails destined to non-existing accounts. This way you can create addresses such as tester123#yourdomain.com and you'll get the verification e-mail.
For each sandbox tester, you’ll need to collect the following information:
Email address that has never been used as an Apple ID to purchase iTunes or App Store content, nor associated with any existing Apple ID. Consider creating a dedicated email address for each sandbox tester.
https://help.apple.com/app-store-connect/#/dev8b997bee1
This means that you cannot use use an existing Apple ID or #icloud.com email as a sandbox tester.
June 2020 Solution
You need a different email address than your standard AppleID. If your AppleID is name#gmail.com, then you have to use a complete different email like othername#gmail.com.
If you use gmail, you can use many test accounts with the same email address (but different from the standard AppleID). Just add a dot to generate multiple test users with the same email address:
othername#gmail.com
o.thername#gmail.com
ot.hername#gmail.com
and so on
The email cannot be associated with an existing account, please see the link below.
Because the email address used to create a sandbox tester account can't be associated with any existing Apple account, consider creating a dedicated email address for each sandbox tester.
https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/SettingUpUserAccounts.html

Resources