CloudKit: CREATE operation not permitted

Hi,


I'm trying to use CloudKit Web Services to access my public database (development env.) I can read the records, when I try to use enpoint /records/modify I always get response that CREATE operation not permitted

{
  "records" : [
    {
      "serverErrorCode" : "ACCESS_DENIED",
      "recordName" : "E99612AE-34A7-482E-876E-BE2F3D063397",
      "reason" : "CREATE operation not permitted"
    }
  ]
}


I have Web Token obtained as described here (Authenticating Users): https://developer.apple.com/library/prerelease/ios/documentation/DataManagement/Conceptual/CloutKitWebServicesReference/SettingUpWebServices/SettingUpWebServices.html#//apple_ref/doc/uid/TP40015240-CH24-SW1


I already did try enable "everything" in "Security" of my "Record Type", didn't help. What should I do to make it work ? help, I'm totally stuck.

Post not yet marked as solved Up vote post of krzyzanowskim Down vote post of krzyzanowskim
3.6k views

Replies

I am having the same error how did you fix this??

It's really really sad that this problem has a high search ranking on Google, and yet remains unanswered by Apple or anyone else.

Also having this error, and ZERO luck finding the answer. This problem listed here is 4 years old.. crickets. Come'on Apple, ***?

Anyone find a solution?

Going to Settings.app in Simulator and re-authenticating my iCloud account fixed this issue for me.
  • What do you mean reauthinticate? Sign out and sign back in? Or put password in again?

  • The Simulator won't let me sign out of iCloud. The button that says "Sign Out" when I go to Settings then to the very top cell that shows my Apple ID is grayed out. Clicking on "Password & Security" gives me a message box saying "Account Details Unavailable" and gives me a button that says "Get Verification Code" and another that says "OK".

Add a Comment

Worked for me also.

I also have such an error message. When I open [Settings] in the simulator, click on my avatar and name at the top to enter my apple id page, and the alert will automatically come out to verify the password. After I enter the correct password, re-run the project, It started working. --from Google Translate

So if the user isn't logged into iCloud we can't create records in the CloudKit database? This may fail business logic :(