NEW: My new book Pro SwiftUI is out now – level up your SwiftUI skills today! >>

CloudKit question regarding limits

Forums > Swift

Hi All,

Hope you are all well.

I have a quick question regarding limits of records returned from CloudKit, more specifically how to collect all records.

The issue I face is that I could and most likely will have more than 100 records returned from a CloudKit query, I have read on the Apple Docs that I should use the cursor return value to collect the rest of the records past the 100 initially retrieved however I am unsure how to approach this in code as the Docs say that you should create a new process each time to fully retrieve all records.

A quick and easy way would be to set the maximum result limit to 1000 however there may be an edge case where the number of records received back could be more than this and as the Docs recommend the cursor approach, I have a feeling that its designed in such a way to be fast and efficient and therefore I desire to use the correct approach.

Would anyone be able to talk me though Apples solution at all please?

This is the link to the Apple Documentation I am referring to

   

Hacking with Swift is sponsored by Play

SPONSORED Play is the first native iOS design tool created for designers and engineers. You can install Play for iOS and iPad today and sign up to check out the Beta of our macOS app with SwiftUI code export. We're also hiring engineers!

Click to learn more about Play!

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.