© Bruce Wade 2016

Bruce Wade, OS X App Development with CloudKit and Swift, 10.1007/978-1-4842-1880-8_7

7. Updating CloudKit Data from Our App

Bruce Wade

(1)Suite No. 1408, North Vancouver, British Columbia, Canada

In the last chapter we got our app working with dynamic data pulled from the CloudKit servers. In this chapter we will update our app to allow us to change existing CloudKit data, create new data for our record types, and finally to delete data from CloudKit servers.

Updating Existing Data

Let’s take a look at how to update a park when it is changed within our app. First, we need to update our API with a helper method to prevent code duplication. This helper method’s job is to convert the park CKRecord into a Park object. Copy the code ...

Get OS X App Development with CloudKit and Swift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.