We want to hear about your app! It will - literally - take just a minute, but help us a lot. Thank you! 🙏
ObjectBox is a superfast, light-weight object persistence framework. This Swift API seamlessly persists objects on-device for iOS and macOS.
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.
This codebase of ObjectBox builds exclusively with spm. It is currently up to date with version 1.3.1 of https://github.com/objectbox/objectbox-swift/
Install objectbox-c:
wget https://raw.githubusercontent.com/objectbox/objectbox-c/master/download.sh
chmod +x download.sh
./download.sh
Install flatbuffers:
brew install flatbuffers
Build with Swift Package Manager:
swift build -Xcc -I/usr/local/include -Xswiftc -I/usr/local/include -Xswiftc -L/usr/local/lib
Test with Swift Package Manager:
swift test -Xcc -I/usr/local/include -Xswiftc -I/usr/local/include -Xswiftc -L/usr/local/lib
Generate Xcode Project:
swift package generate-xcodeproj --xcconfig-overrides ObjectBox.xcconfig
open ObjectBox.xcodeproj
We want ObjectBox to be not only the fastest, but also the most Swift-friendly persistence solution.
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:
- Take this short questionaire (takes only 1 or 2 minutes)
- Add GitHub issues and
- Upvote issues you find important by hitting the 👍/+1 reaction button!
Thank you!
Sign up here for future updates on ObjectBox Swift.
For general news on ObjectBox, check our blog or follow @ObjectBox_io on Twitter.
ObjectBox Swift 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 for ObjectBox's Swift binding can be found in the Source folder.
ObjectBox is a multi platform database supporting multiple languages:
- ObjectBox Java: runs on Android, desktop and servers.
- ObjectBox Go: great for data-driven tools and server applications.
- ObjectBox C: native speed with zero copy access to FlatBuffer objects; also enables porting ObjectBox to other languages.
- ObjectBox Dart/Flutter: build cross-platform apps using Flutter (beta version)
All files in this repository are under the Apache 2 license:
Copyright 2018-2019 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.