Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Core Data iSunny iDays

DZone's Guide to

Core Data iSunny iDays

The deprecation of iCloud Core Data is on the horizon. While not as severe as the Parse shutdown, you might want to start planning.

· Mobile Zone
Free Resource

Discover how to focus on operators for Reactive Programming and how they are essential to react to data in your application.  Brought to you in partnership with Wakanda

Why “iSunny iDays”? Why, because iCloud is going iAway! That’s no surprise for those of you paying attention since 2014 at least, but now it’s sorta-kinda official. As usual, Michael Tsai has a good roundup:

The Deprecation of iCloud Core Data

… When installing the Xcode 8 beta, I noticed that all of the symbols related to iCloud Core Data were marked as deprecated in macOS 10.12 and iOS 10, with the comment “Please see the release notes and Core Data documentation.” Strangely, the Core Data release notes and What’s New in macOS 10.12 documents make no mention of this. What’s New in iOS 10 simply says that “Several NSPersistentStoreCoordinator symbols related to ubiquitous content” have been deprecated.

I asked on Twitter what was up, and no one seemed to know. No one had anything nice to say about iCloud Core Data, either, though no doubt many developers still rely on it. I hoped that all would be explained in today’s WWDC Session 242: What’s New in Core Data. Alas, reports are that absolutely nothing was said about iCloud in the session…

No need to panic immediately, they’re not pulling a Parse on us or anything like that … yet … but you certainly would be well served to adopt an alternate solution if Core Data iCloud sync appears anywhere in your technology roadmap. Apparently, the mothership has something in the works, but if you have an immediate development need for Core Data cloud sync, there’s one clear choice:

It seems clear that the way forward is Ensembles, unless you want to write your own sync engine or wait for Apple to announce one. I hope that the deprecation will spur more of the community to coalesce around Ensembles.

Indeed. We’ve been vaguely aware of it since the 2013 announcement, but we’d managed to miss until now that there’s a commercial with source access Ensembles 2 that includes CloudKit and other backends, whilst the original remains open source on GitHub. And in the likely event that you agree that seems a clear way forward, this is a good time to jump on board:

The Core Data Sync Deprecation Sale

If you move to Ensembles now, you not only get the usual support, documentation, and source code, you also get it all at half the standard price. The sale will continue until macOS Sierra is released later this year.

Whilst that sync thing is still up in the air, Core Data itself moved forward nicely this year, most notably in that standing up your stack is now much more straightforward:

Concurrent Core Data, Now Easier Than Ever

Core Data has a popular opinion of being hard to use, especially in concurrent environments. Why is that the case? First, it truly is complex because it solves a hard problem. Second, until WWDC16 Apple haven’t really said how to best set up the Core Data stack. There were many options, each with its own issues, that we had to choose from.

That’s why I’m super happy that things get clearer in iOS 10 with the introduction of NSPersistentContainer…

We’ve been pretty happy with JSQCoreDataKit for our Swift projects, but soon as your deployment targets allow, there's all sorts of win with the new stuff here!

And as a final note, if you’re all excited about the new playground stuff — and who isn’t? — check out the explorations here:

Using a Core Data Model in Swift Playgrounds

Is this a great time to be alive, or what?

Learn how divergent branches can appear in your repository and how to better understand why they are called “branches".  Brought to you in partnership with Wakanda

Topics:
swift ,cloud

Published at DZone with permission of Alex Curylo, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}