7
votes

I'm trying to read data from the public database using CloudKit.

let publicDB = CKContainer.defaultContainer().publicCloudDatabase
let query = ...
publicDB.performQuery(query, inZoneWithID: nil) { results, error in
    // "Internal Error" (1/1000); "Received a didCompleteWithError without receiving a response from the server">)
}

However, once I login to iCloud, I get the data back as expected. Per the documentation, one should be able to access Public DB related records without being logged in, correct?

One thing to note, is that I am using the simulator.

1
Looks like a bug to me. - Adam

1 Answers

14
votes

Looks like I missed this part of the documentation:

In development, when you run your app through Xcode on iOS Simulator or an iOS device, you also need to enter iCloud credentials to read records in the public database.

Apple Documentation