Saving CloudKit Record “Not Authenticated” (9/1002)“ ”This request requires an authenticated account“”

后端 未结 6 872
星月不相逢
星月不相逢 2021-02-12 12:33

Saving a CKRecord in the simulator gives me the following error:

[publicDatabase saveRecord:cloudRouteEntity completionHandler:^(CKRecord *record, NS         


        
6条回答
  •  余生分开走
    2021-02-12 13:23

    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):

    1. Run simulator (Xcode) - Run an app from Xcode in the simulator by selecting Product > Run
    2. App Home Screen (Simulator) - Within the simulator, navigate to the Home screen by selecting Hardware > Home
    3. Settings App (Simulator) - Find the settings app (gear), run it and select iCloud
    4. Authenticate (Simulator) - Enter your credentials and login (or re-login if your credentials have changed) to iCloud. Once you do this you can re-run your app and it should properly authenticate to iCloud

    Once you do this you are good to go for future builds and runs.

提交回复
热议问题