Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Realm work well with iCloud?

I want to write an app for both iOS and OS X which shares a common database and syncs via iCloud. I had planned to use Realm, but then wondered if it is a good fit when used in conjunction with CloudKit or should I use Core Data instead?

Thanks.

like image 214
Stephen Watson Avatar asked Oct 30 '22 17:10

Stephen Watson


1 Answers

iCloud allows you to backup and sync files across all connected user devices. With Realm, you could theoretically settle on that as long as only one single client access the data to any point in time, which will be hard to guarantee. Furthermore there are restrictions on the file size, which will make this solution likely fragile.

CloudKit is a backend-as-a-service solution, which allows you to setup a schema and request your data from there. It doesn't bring a builtin persistence layer. You would need to provide that logic yourself, for integration with CoreData as for Realm.

like image 115
marius Avatar answered Nov 15 '22 05:11

marius