Cloudkit not getting all records with Swift 3

I am updating an existing app to Swift 3 that pulls down events from Cloudkit. The issue is that it appears to be pulling records onlyfrom 2016. Any new records I add are not appearing, even when I do not filtering and request all records. The live app in the app store works properly, pulling down current and new records added. I have been looking to any changes in Swift 3, beyond syntax that might be the cause. Any insignt would be appreciated.

Accepted Reply

I'd be very surprised if the language that your app is using caused a difference in the actual queries that are being issued. I'm assuming you're working in the development environment, is that correct? Have you verified the contents in the CloudKit Dashboard to see if the records you're expecting to retrieve are actually there?

Replies

I'd be very surprised if the language that your app is using caused a difference in the actual queries that are being issued. I'm assuming you're working in the development environment, is that correct? Have you verified the contents in the CloudKit Dashboard to see if the records you're expecting to retrieve are actually there?

Bingo, this was exactly the issue. Because the app is live I was adding records to the production environment and of course xCode was looking at the development environtment. While I feel silly for missing this I really appreciate you assistance.

No reason to feel silly, I've done exactly the same thing. 🙂