1

I got this message "Account temporarily unavailable due to bad or missing auth token" when I try to save to privateDatabase in CloudKit, using the CKDatabase.save(record:completionHandler).

It looks like the error that was posted about here on stackoverflow has reappeared.

The fix for that other problem was a bug in Apple's side.

Anyone have this problem recently and have a solution?

daniel
  • 1,446
  • 3
  • 29
  • 65

2 Answers2

4

You might find it strange, When I got this error,

  1. I went to settings, I did it in Simulator
  2. Profile Section
  3. Entered password.

After this, When I called the iCloud API again, It worked.

enter image description here

3

I was getting this repeatedly all of a sudden on an account that had worked fine before. Shutting things down and restarting didn't help.

This is xcode 13.3.1 using a simulator.

I went to the simulator menu: "Device" => "Erase all content and settings". I then logged in again via settings on the simulator. And then it was fine.

Jack
  • 2,206
  • 3
  • 18
  • 25