Home/Q&A/My remote Mac keeps asking for an Apple ID verification code I can't receive

My remote Mac keeps asking for an Apple ID verification code I can't receive

Updated · airankrush

Direct answer

The verification code is in your own hands. According to Apple, it is displayed on your trusted devices or sent to your trusted phone number; it does not appear on the remote Mac. If you have no other Apple device, choose to have it sent to your phone number.

Basis

  • Apple's support documentation states that when you sign in on a new device or on the web, you need your password and a six-digit verification code, and the code is displayed automatically on your trusted devices or sent to a trusted phone number (checked 2026-11-12, source). To your account, the remote Mac is a new device.
  • The sign-in prompt may include an approximate location. The machine is located in the United States, so a prompt showing somewhere near the United States is normal and does not mean someone else has signed in to your account, provided the sign-in really is the one you just started yourself.
  • To reduce repeated verification: sign in to the developer account only in Xcode's account settings, and do not sign in and out back and forth between System Settings, the App Store and Xcode. Once verification succeeds, this Mac is recorded as a trusted device until you sign out of the account.
  • Command-line uploads can avoid interactive sign-in. An App Store Connect API key is used to sign and authorize requests; according to Apple's documentation the key's private key file can be downloaded only once and Apple does not keep a copy (source). If you switch uploads to API key authentication, you no longer have to enter a verification code each time. For exact usage, follow the documentation of the tool you use.

Information as of .

Boundaries: when the answer is different

An account being locked, being asked for extra identity verification, or not receiving text messages is decided by Apple and your mobile carrier. We cannot step in, and we do not guarantee the sign-in outcome for any account. Do not send verification codes or passwords to support or to anyone else; our support staff will never ask for them. If your trusted phone number is no longer in use, update it on Apple's account page first, then come back and sign in.

How to do it

  1. Before signing in, have the phone or trusted device that receives the code within reach.
  2. Add the account in Xcode's account settings, enter the password and wait for the verification code.
  3. If nothing appears on a trusted device, choose the option on the sign-in screen saying you did not get a code and have it sent to your phone number instead.
  4. After signing in successfully, stay signed in until all the work for this rental term is finished.
  5. If you want automated uploads, generate an API key in App Store Connect and keep the private key file safe.

Use case

This question belongs to the use case: iOS without a Mac: a remote Mac mini can build, sign and upload, but not debug on a real device

Other questions in the same use case:

Pricing and availability: see the plans page · Help center (中文) · Refund policy (中文) · Telegram Contact support

Back to home · All Q&A