UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

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 RevenueCat

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

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

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

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.