ObjectBox alternatives and similar libraries
Based on the "Database" category.
Alternatively, view ObjectBox embedded database 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. -
Realm
Realm is a mobile database: a replacement for Core Data & SQLite -
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! -
Unrealm
Unrealm is an extension on RealmCocoa, which enables Swift native types to be saved in Realm. -
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. -
realm-cocoa-converter
A library that provides the ability to import/export Realm files from a variety of data container formats. -
Nora
Nora is a Firebase abstraction layer for FirebaseDatabase and FirebaseStorage -
SecureDefaults
Elevate the security of your UserDefaults with this lightweight wrapper that adds a 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. -
ObjectiveRocks
An Objective-C wrapper for RocksDB - A Persistent Key-Value Store for Flash and RAM Storage. -
PostgreSQL
A stand-alone Swift wrapper around the libpq client library, enabling access to PostgreSQL servers. -
SQLite
A stand-alone Swift wrapper around the SQLite 3 client library. -
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.
WorkOS - The modern identity platform for B2B SaaS
* 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 ObjectBox or a related project?
README
Swift Database - swiftly persist objects on iOS and macOS
Your opinion matters to us! Please fill in this 2-minute Anonymous Feedback Form.
ObjectBox is a superfast, light-weight Swift database persisting Swift objects fast, easily, and fully ACID-compliant on-device on iOS and macOS. On top, it comes with an out-of-the-box Data Sync handling the complexity of occassionally connected devices, networking and conflict resolution code for you. Build apps that reliably sync between devices and any backend, offline on-premise or online with the Cloud.
let santa = Person(firstName: "Santa", lastName: "Claus")
try personBox.put(santa)
let query: Query<Person> = personBox.query {
return (Person.firstName.contains("Santa") || Person.age > 100)
&& Person.lastName.isEqual(to: "Claus")
}.build()
let oldClauses = query.find()
Want details? Read the guides or check out the API docs.
Table of Contents
- Features
- Adding ObjectBox to your project
- Example
- Background: code generation
- Source code
- Already using ObjectBox?
- Cross-platform database: Mobile, Desktop, Browser, Embedded, IoT
- License
Features
๐ High performance on restricted devices, like IoT gateways, micro controllers, ECUs etc.\ ๐ช Resourceful with minimal CPU, power and Memory usage for maximum flexibility and sustainability\ ๐ Relations: object links / relationships are built-in\ ๐ป Multiplatform: Linux, Windows, Android, iOS, macOS
๐ฑ Scalable: handling millions of objects resource-efficiently with ease\ ๐ Queries: filter data as needed, even across relations\ ๐ฆฎ Statically typed: compile time checks & optimizations\ ๐ Automatic schema migrations: no update scripts needed
And much more than just data persistence\ ๐ฅ ObjectBox Sync: keeps data in sync between devices and servers\ ๐ ObjectBox TS: time series extension for time based data
Enjoy โค๏ธ
Adding ObjectBox to your project
CocoaPods is recommended to set up ObjectBox in your project.
See the installation docs for alternative setups,
or the New to CocoaPods? section below for a quick intro.
To install the ObjectBox
pod, add the following line to your Podfile:
pod 'ObjectBox'
Then run this to install the ObjectBox framework:
cd /path/to/your/project/folder/ # whatever folder your Podfile is in.
pod install
Pods/ObjectBox/setup.rb myproject.xcodeproj # whatever your Xcode project is named
And, don't forget to close the Xcode project (.xcodeproj) and open the workspace (.xcworkspace) instead. Now, you are all set to define your first ObjectBox entities; e.g. check the getting started guide or the example described below.
New to CocoaPods?
CocoaPods is a dependency manager and sets up libraries like ObjectBox in your Xcode project. To install it, run this in a terminal:
sudo gem install cocoapods
In CocoaPods, you keep track of used libraries in a file called "Podfile". If you don't have this file yet, navigate to your Xcode project folder and use CocoaPods to create one:
pod init
CocoaPods troubleshooting
If pod install
fails, try updating CocoaPods first:
gem update xcodeproj && gem update cocoapods && pod repo update
Swift versions
Here's a list of ObjectBox releases, and the Swift versions they were compiled with:
ObjectBox version(s) | Swift version |
---|---|
1.5.0 | 5.3(.2) |
1.4.1 | 5.3 |
1.3, 1.4.0 | 5.2 |
1.2 | 5.1 |
This might be relevant, e.g. when using Carthage. For various reasons, we recommend using the latest version.
Example
In the [Example](Example/) directory, you'll find a "Notes" example app demonstrating ObjectBox's Swift API. The example comes with two apps: one for iOS and one for macOS. The iOS example is a full GUI application, whereas the macOS example runs a few operations and then exits.
To setup the example, use CocoaPods to acquire the framework:
cd Example/
pod install # if that fails, update CocoaPods (see Installation)
Pods/ObjectBox/setup.rb
This will generate a NotesExample.xcworkspace
that you can launch to try out ObjectBox.
Background: code generation
ObjectBox Swift Database generates code at build time for optimal performance at runtime by avoiding reflection etc. This is automatically done for you and should be transparent. Internally, we use a fork of Sourcery for this.
Source code
Source code for ObjectBox's Swift binding can be found [in the Source folder](Source/README.md).
Already using ObjectBox?
We're on a mission to bring joy and delight to Mobile app developers. We want ObjectBox not only to be the fastest Swift database, but also the swiftiest Swift data persistence, making you enjoy coding with ObjectBox.
To do that, we want your feedback: what do you love? What's amiss? Where do you struggle in everyday app development?
We're looking forward to receiving your comments and requests:
- Add GitHub issues
- Upvote issues you find important by hitting the ๐/+1 reaction button
- Drop us a line via @ObjectBox_io
- โญ us, if you like what you see
Thank you! ๐
Keep in touch: For general news on ObjectBox, check our blog!
Cross-platform database: Mobile, Desktop, Browser, Embedded, IoT
ObjectBox is a cross-platform database supporting multiple native languages:
- ObjectBox Java/Kotlin Database: runs on Android, desktop, and servers.
- Golang Data Persistence: great for IoT, data-driven tools, and server applications.
- C and C++ Database: native speed with zero copy access to objects on embedded devices also enables porting ObjectBox to other languages.
- Flutter/Dart Database: persist Dart objects & build cross-platform apps using Flutter.
License
All files in this repository are under the Apache 2 license:
Copyright 2018-2021 ObjectBox Ltd. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*Note that all licence references and agreements mentioned in the ObjectBox README section above
are relevant to that project's source code only.