How to keep updating cloud kit record in swift?
My app needs to update users current location to cloud server
So how to update users current location to cloud server?
I tried to use saveRecord but it doesn’t work
and error occurred
error:Optional(<CKError 0x17005eea0: "Server Record Changed" (14/2037); "Error saving record <CKRecordID: 0x1458bb9c0; FASVSE10761FDM:(_defaultZone:__defaultOwner__)> to server: Protection data didn't match">)
Solutions Collect From Internet About “How to keep updating cloud kit record in swift?”
You first have to fetch the record, then change it and save it back. If you get the same error, then the record is changed by someone else. You can get the changed record from the error or you could just fetch it again. Then again apply the changes and save it to CloudKit
- Using shader modifiers to animate texture in SceneKit leads to jittery textures over time
- Keep window always on top?
- How to download a file (iOS/Cocoa SDK) from URL where file name is not the part of URL
- Can you add buttons to navigation bars through storyboard?
- Swift – Downloading video with downloadTaskWithURL
- Remove Last Two Characters in a String (Swift 3.0)
- How to set status bar hidden for entire app in iOS?
- change NSSlider Value programmatically
- Best way to access all movie frames in iOS
- How to align a mask onto an image
- Google analytics Ecommerce value is not updating in google analytics console
- Can I intercept marker deselect when I tap another marker in Google Maps SDK for iOS?
- Is there a (legal) way to capture the ENTIRE screen under iOS?
- How to get height of topLayoutGuide?
- Trouble running Instruments on iPad