Unrealm alternatives and similar libraries
Based on the "Database" category.
Alternatively, view Unrealm alternatives based on common mentions on social networks and blogs.
-
MMKV
An efficient, small mobile key-value storage framework developed by WeChat. Works on Android, iOS, macOS, Windows, and POSIX. -
GRDB.swift
A toolkit for SQLite databases, with a focus on application development -
YapDatabase
YapDB is a collection/key/value store with a plugin architecture. It's built atop sqlite, for Swift & objective-c developers. -
ParseAlternatives
GraphQLite is a toolkit to work with GraphQL servers easily. It also provides several other features to make life easier during iOS application development. [Moved to: https://github.com/relatedcode/GraphQLite] -
Couchbase Mobile
Lightweight, embedded, syncable NoSQL database engine for iOS and MacOS apps. -
FCModel
An alternative to Core Data for people who like having direct SQL access. -
UserDefaults
Simple, Strongly Typed UserDefaults for iOS, macOS and tvOS -
CTPersistance
iOS Database Persistence Layer with SQLite, your next Persistence Layer! -
Prephirences
Prephirences is a Swift library that provides useful protocols and convenience methods to manage application preferences, configurations and app-state. UserDefaults -
RealmIncrementalStore
Realm-powered Core Data persistent store -
UserDefaultsStore
Why not use UserDefaults to store Codable objects 😉 -
PredicateEditor
A GUI for dynamically creating NSPredicates at runtime to query data in your iOS app. -
Nora
Nora is a Firebase abstraction layer for FirebaseDatabase and FirebaseStorage -
realm-cocoa-converter
A library that provides the ability to import/export Realm files from a variety of data container formats. -
SecureDefaults
Elevate the security of your UserDefaults with this lightweight ✨ wrapper that adds an additional layer of AES-256 encryption -
MySQL
A stand-alone Swift wrapper around the MySQL client library, enabling access to MySQL servers. -
PersistenceKit
Store and retrieve Codable objects to various persistence layers, in a couple lines of code! -
PersistentStorageSerializable
Swift library that makes easier to serialize the user's preferences (app's settings) with system User Defaults or Property List file on disk. -
YapDatabaseExtensions
YapDatabase extensions for use with Swift -
TypedDefaults
TypedDefaults is a utility library to type-safely use NSUserDefaults. -
MongoDB
A stand-alone Swift wrapper around the mongo-c client library, enabling access to MongoDB servers. -
PostgreSQL
A stand-alone Swift wrapper around the libpq client library, enabling access to PostgreSQL servers. -
ObjectiveRocks
An Objective-C wrapper for RocksDB - A Persistent Key-Value Store for Flash and RAM Storage. -
Storez
💾 Safe, statically-typed, store-agnostic key-value storage written in Swift! -
FileMaker
A stand-alone Swift wrapper around the FileMaker XML Web publishing interface, enabling access to FileMaker servers.
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Unrealm or a related project?
README
Unrealm enables you to easily store Swift native Classes, Structs and Enums into Realm .Stop inheriting from Object! Go for Protocol-Oriented programming! Made with ❤️ by arturdev
Features
Unrealm supports the following types:
- [x] Swift Primitives
- [x] Swift Structs
- [x] Swift Classes
- [x] Swift Enums
- [x] Swift Arrays
- [x] Swift Dictionaries
- [x] Nested Classes/Structs
- [x] Swift Optionals (String, Data, Date)
- [x] Swift Optionals of primitives (Int, Float, Double, Bool)
- [x] Swift Optionals of Realmables
- [x] Swift Optionals of Arrays
- [x] Swift Arrays of enums
Example Project
To run the example project, clone the repo, and run pod install
from the Example directory first.
See also Unit Tests.
Usage
All you have to do is
- Conform your Classes/Structs to
Realmable
protocol instead of inheriting fromObject
. Conform your Enums toRealmableEnum
protocol. - Register your Classes/Structs and Enums in AppDelegate's
didFinishLaunchingWithOptions
.Swift Realm.registerRealmables(ToDoItem.self)
Thats it! Now you can store your Struct or Class object into Realm as usualy you do with Objc Classes.
Pros and Cons
Pros 🎉
- Enables you to store Swift native types (Structs, Classes, Enums, Arrays, Dictionaries, etc...)
- Getting rid of redundant inheriting from Object class
- Getting rid of Realm crashes like "Object has been deleted or invalidated"
- Getting rid of Realm crashes like "Realm accessed from incorrect thread"
- Getting rid of boilerplate code such as
@objc dynamic var
. Use justvar
orlet
- Getting rid of boilerplate code such as
RealmOptional<Int>
. Use justInt?
- Works perfect with Swift's Codable and optional types!
Cons 🍟
- Losing "Live Objects" feature. Which means when you modify an object got from Realm the other ones will not be updated automatically. So after modifying an object you should manually update it in realm.
f.e.;
Swift let realm = try! Realm() var todoItem = realm.object(ofType: ToDoItem.self, forPrimaryKey: "1") todoItem.text = "Modified text" try! realm.write { realm.add(todoItem, update: true) //<- force Realm to update the object }
Installation
CocoaPods
Unrealm is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'Unrealm'
Swift Package Manager
You can also use Swift Package Manager to add Unrealm as a dependency to your project. In order to do so, use the following URL:
https://github.com/arturdev/Unrealm.git
You need to use "SPM" branch instead of master.
ToDos
- Add more UnitTests
- Create a sample project for Swift Package Manager when dependencies can be added to many targets in a simple project.
Contribution
⭐️ If you like what you see, star us on GitHub.
Find a bug, a typo, or something that’s not documented well? We’d love for you to open an issue telling me what I can improve!
Contributions are welcome, and they are greatly appreciated!
Author
arturdev, [email protected]
License
Unrealm is available under the MIT license. See the LICENSE file for more info.
*Note that all licence references and agreements mentioned in the Unrealm README section above
are relevant to that project's source code only.