Generic Realm data storage

Sayler8182
Sep 5, 2018 · 1 min read

Almost every application requires data storage. Realm has become very popular in iOS, that’s why I decided to create a generic class that helps me manage my data in easy way.

Protocol of LocalStorage

LocalStorage implementation

Realm object model

Usage


All CRUD operations

Read one object
Read multiple objects
Write one and multiple objects
Update object
Delete object

Thank you for reading! If you liked this article, please clap so other people can read it too. I will also have more motivation for next article :) You can also see my other articles, maybe you will find something for you.

If you have any question or suggestion leave a comment.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade