Saving a CKRecord
in the simulator gives me the following error:
[publicDatabase saveRecord:cloudRouteEntity completionHandler:^(CKRecord *record, NS
I'm seeing the same error. According to the discussion linked below the cause might be two-factor authentication.
https://discussions.apple.com/thread/6588883
I got the same problem, which I was able to resolve by logging in to my iCloud account in the simulator (Settings > iCloud).
As of the latest Xcode, you can log in to your iCloud account in the simulator, and everything should work.
If you are having trouble logging in, try to go to iCloud.com on a desktop and log in there first. Once that is set up properly, then try in the simulator.
I had similar issue unless I did login into Settings app/iCloud section on my iPad Retina iOS8.1.1
Because folks might misinterpret the approved answer (as I did) here is a little more detail to get through this (you can use keyboard shortcuts but I am specifying menu selections for clarity):
Once you do this you are good to go for future builds and runs.
Reset the simulator completely (make sure nothing is left), re-install it. Maybe you got a wrong bit version? If possible, try if it works on a other PC or Laptop.
I tested it and i was able to connect to iCloud so i am pretty sure its something about your settings / wrong install etc.
I was having the same problem.
I has added an id query index in the Users Records, when i removed this index the problem stopped.
I dont even know whats the relation between these things, but it worked for me.
Sorry for the bad english