Symptom
You enter your Apple Account and password in Xcode, the App Store or System Settings on the remote Mac, it asks for a six-digit verification code, and the code never seems to come. Or you enter it and get a verification failure and a request to sign in again.
Possible causes (most common first)
- The code was sent to a trusted device next to you and appeared there as a pop-up, while you were watching the remote Mac's screen.
- You have no trusted device at hand and did not switch to having the code sent to a trusted phone number.
- The text message was caught by your phone's unknown-sender filter, or the trusted number is no longer in service.
- The code timed out, or too many wrong attempts triggered a temporary limit. It can also be an outage on Apple's side at that moment.
Troubleshooting steps (easiest first)
Look at your own iPhone or iPad first
With two-factor authentication, the code is shown on a trusted device already signed in to the same account. That device first shows a sign-in prompt, and the six digits appear only after you tap Allow. Type those digits into the dialog on the remote Mac. The approximate location shown in the prompt is the United States. That is expected, because the machine is in the United States.
No trusted device? Use a text message
On the code screen, click “Didn't get a verification code?” or the option for when you cannot reach your devices, and choose to send the code to your trusted phone number. Apple delivers it by text message or voice call. Full instructions: Apple Support: Get a verification code and sign in with two-factor authentication. If the message is slow to arrive, check whether your phone filters unknown senders.
For development only, skip system-level iCloud
Archiving and uploading only need a sign-in inside Xcode: add your Apple Account under Xcode → Settings → Accounts. You do not need to sign in to iCloud in System Settings. Signing in only where you need it keeps less personal data syncing to this machine. We recommend an account used only for development.
If you did sign in through System Settings, turn off Find My Mac
When you sign in to iCloud, macOS may offer to turn on Find My. On a rented machine it must stay off, otherwise reclaiming the machine at the end of the rental runs into trouble. After signing in, open the Apple Account page in System Settings and check once.
After repeated failures, stop for a while
Entering wrong codes several times in a row, or requesting codes repeatedly in a short time, can get the account temporarily limited by Apple, and more attempts only lengthen the wait. Check Apple's System Status page to see whether the account-related services are up, then try again later. If your trusted number can no longer be used, the only route is Apple's account recovery process. We cannot help with that step.
When to contact support directly
Problems with the account itself (no text messages, a locked account, recovery) can only be solved by Apple Support. Come to us when the same account signs in fine on your own devices, but on this Mac neither Xcode nor the App Store can reach Apple's services, or macOS says sign-in is restricted. Contact support on Contact support with your machine ID, the app that fails, when it happened, and a screenshot of the error with account details hidden. Never send verification codes or passwords to anyone, support included.
Related
- Can I sign in with my own Apple Developer account on a rented Mac?
- iOS without a Mac: a remote Mac mini can build, sign and upload, but not debug on a real device
- App Store download stuck or spinning forever on a remote Mac
- Xcode: No signing certificate found, or provisioning profile doesn't include signing certificate
- How do I sign an iOS app and upload it to the App Store from a remote Mac?
Pricing and availability: see the plans page · Help center (中文) · Refund policy (中文) · Telegram Contact support