# Core Data and CloudKit

**URL:** <https://forums.kodeco.com/t/core-data-and-cloudkit/25482>\
**Category:** Core Data by Tutorials\
**Created:** [January 22, 2017, 10:46pm UTC](https://forums.kodeco.com/t/core-data-and-cloudkit/25482 "2017-01-22T22:46:49Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![createch](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/createch/32/109646_2.png) [@createch](https://forums.kodeco.com/u/createch)\
**Post date:** [January 22, 2017, 10:46pm UTC](https://forums.kodeco.com/t/core-data-and-cloudkit/25482/1 "2017-01-22T22:46:49Z")

</div>

I would really love to see a section on Core Data \<-\> CloudKit synchronization. This is something that I think many would find extremely useful.  
I want to build an iOS and a MacOS app that synchronizes data across devices so I thought that CloudKit is the way to go. The data will be stored locally using Core Data, but I want to send changes up to CloudKit and make sure that all other devices are in sync.

I have done a lot of searching on this, but there is no simple, step-by-step tutorial for this.

---

<div class="post-metadata">

**Author:** ![willclarke](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@willclarke](https://forums.kodeco.com/u/willclarke)\
**Post date:** [June 22, 2017, 11:33pm UTC](https://forums.kodeco.com/t/core-data-and-cloudkit/25482/2 "2017-06-22T23:33:02Z")

</div>

I agree - I hope the next version of their book includes this. I just bought the current version, based on its description on Amazon which says it includes “syncing with iCloud” only to find that the most recent version of this book has removed the section. Looks like the new way to do this is via CloudKit, but there is no discussion of it in this book.

---

<div class="post-metadata">

**Author:** ![syedfa](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/syedfa/32/101500_2.png) [@syedfa](https://forums.kodeco.com/u/syedfa)\
**Post date:** [August 14, 2017, 3:11am UTC](https://forums.kodeco.com/t/core-data-and-cloudkit/25482/3 "2017-08-14T03:11:44Z")

</div>

@cretech & @willclarke Thanks very much for your post, and my deepest apologies for the delayed reply.

The Core Data book’s focus is precisely that, Core Data. However, to get familiar with CloudKit, we do have an updated video course that you might find useful:

[Beginning CloudKit](https://videos.raywenderlich.com/courses/79-beginning-cloudkit/lessons/1)

I hope this helps!

All the best. 🙂

---

<div class="post-metadata">

**Author:** ![richardepitts](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@richardepitts](https://forums.kodeco.com/u/richardepitts)\
**Post date:** [August 19, 2017, 5:47pm UTC](https://forums.kodeco.com/t/core-data-and-cloudkit/25482/4 "2017-08-19T17:47:10Z")

</div>

This is exactly what I need too.

---

<div class="post-metadata">

**Author:** ![trevor](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/trevor/32/81725_2.png) [@trevor](https://forums.kodeco.com/u/trevor)\
**Post date:** [September 19, 2018, 5:20pm UTC](https://forums.kodeco.com/t/core-data-and-cloudkit/25482/5 "2018-09-19T17:20:39Z")

</div>

This is still exactly what I need. Core data alone is cool. CloudKit alone is cool. But what would be AMAZING is a book or course that is focused on using both together, keeping them in sync, resolving conflicts between the two data sources, etc.

---

<div class="post-metadata">

**Author:** ![mklybor](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/mklybor/32/79544_2.png) [@mklybor](https://forums.kodeco.com/u/mklybor)\
**Post date:** [April 25, 2019, 2:56pm UTC](https://forums.kodeco.com/t/core-data-and-cloudkit/25482/6 "2019-04-25T14:56:44Z")

</div>

take a look at the seam3 sync code on GitHub. it does what you are asking, and reading the source code is quite informative. I’ve just incorporated it, and it seems to work as advertised.

---

<div class="post-metadata">

**Author:** ![trevor](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/trevor/32/81725_2.png) [@trevor](https://forums.kodeco.com/u/trevor)\
**Post date:** [April 25, 2019, 4:15pm UTC](https://forums.kodeco.com/t/core-data-and-cloudkit/25482/7 "2019-04-25T16:15:17Z")

</div>

Thanks - I’ll check it out!

---

<div class="post-metadata">

**Author:** ![syedfa](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/syedfa/32/101500_2.png) [@syedfa](https://forums.kodeco.com/u/syedfa)\
**Post date:** [June 25, 2019, 7:10pm UTC](https://forums.kodeco.com/t/core-data-and-cloudkit/25482/8 "2019-06-25T19:10:18Z")

</div>

I do wish to add here the link to the video from Apple on using Core Data with CloudKit from WWDC2019:

[Using Core Data with CloudKit](https://developer.apple.com/videos/play/wwdc2019/202/)

---

<div class="post-metadata">

**Author:** ![sgerrard](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sgerrard/32/93812_2.png) [@sgerrard](https://forums.kodeco.com/u/sgerrard)\
**Post date:** [June 26, 2019, 4:10am UTC](https://forums.kodeco.com/t/core-data-and-cloudkit/25482/9 "2019-06-26T04:10:43Z")

</div>

Based on that video, it looks like Apple has finally nailed it. Built in sync of CoreData by way of CloudKit. Looks very promising to me. I’m looking forward to Xcode 11.

---

<div class="post-metadata">

**Author:** ![briansipple](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/briansipple/32/105896_2.png) [@briansipple](https://forums.kodeco.com/u/briansipple)\
**Post date:** [August 13, 2019, 8:02am UTC](https://forums.kodeco.com/t/core-data-and-cloudkit/25482/10 "2019-08-13T08:02:57Z")

</div>

While I understand the original response to this question two years ago, it looks like `NSPersistentCloudKitContainer` could become a staple of Core Data development. If that’s the case, a related addition to the book would be immensely valuable, IMO.

---

<div class="post-metadata">

**Author:** ![tnewton42](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/tnewton42/32/85812_2.png) [@tnewton42](https://forums.kodeco.com/u/tnewton42)\
**Post date:** [October 14, 2019, 4:09pm UTC](https://forums.kodeco.com/t/core-data-and-cloudkit/25482/11 "2019-10-14T16:09:42Z")

</div>

I agree. My impression from WWDC 2019-202 is that cloud syncing is considered by Apple to be a Core Data enhancement and not so much (if at all) a CloudKit enhancement, and so this subject would be a great and appropriate update to this book.
