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

Project 33 - What's that Whistle / CloudKit error

Forums > 100 Days of Swift

in the section: Reading from iCloud with CloudKit: CKQueryOperation and NSPredicate

Being that the CloudKit site was completely revamped and the Schema metadata has been changed as well the "creationDate" has been decpreciated. However, now there's a property called "createdTimestamp" and when I'm tried to make this both Sortable and Queryable it still returns and error. As a work around created a newe property in Records Field called "date" and on the sort instance on the view controller I changed it to "date" and it's working. Wondering if anyone has ran into this issue and how they solved it.

let sort = NSSortDescriptor(key: "createdTimestamp", ascending: false)

error returned: Unknown field 'createdTimestamp'

4      

I had to reply, so that the others would know. It's true you'd get that exact error even though createdTimestamp does exist in the metadata of your record when you check it on the icloud. You can definitely still use the old creationDate.

3      

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.