DEV Community

Core Data vs. SQLite

Midhet Sulemani on November 06, 2019

Making an iOS application is all fun until you have to start maintaining offline user sessions and preferences on the app. Then comes the age old q...
Collapse
 
kesprit profile image
kesprit

Good post, we can mention UserDefault too to store light weight datas, it can be very powerfull.

In my company, we use GRDB, it's a light third-part for SQLite.
Realm can be a good solution but it belongs to a company and its goodwill, I don't like that and the pod is very heavy in an application.

Collapse
 
bizzibody profile image
Ian bradbury

I've been using Realm since I attempted to learn Core Data back in 2015/6. Core Data gave me such a headache that I ended up looking for something else. Realm was like a breath of fresh air and I've stuck with it since. But now that Mongo have bought Realm I'm a little worried about Realm's future (they're saying all the right things - but well they would wouldn't they)

Apparently Core Data has been much improved over the last year or so. Can anyone shine a light on improvements and why I might want to have another look?

Collapse
 
midhetfatema94 profile image
Midhet Sulemani

I guess a lot of people used to use other forms of persistence in the app previously, for reasons I am not completely aware except for that Core Data felt unnecessarily complicated and intimidating. But since the time I have started using Core data, I feel like the initial code is a one time investment and it can be maintained and versioned easily. Maybe, these changes have come in the recent times, because I have less than 5 years of experience in iOS/Swift.

Collapse
 
donnywals profile image
Donny Wals

Looking forward to reading your getting started with Core Data tutorial šŸ˜€