← 开源
objectbox

objectbox-swift

Swift database - fast, simple and lightweight (iOS, macOS)

InfrastructureData systemsSwift
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
619
Star
37
Fork
+0
本周
7
贡献者
创建于 2018-11-16 · 更新于 2026-09-08 · 今日第 15991 名
主要开发者

objectbox/objectbox-swift 排名第 15,991,有 619 个星标。

同类别比较

objectbox/objectbox-swift 排名第 15,991,此处有 8 个同类条目;apoorvumang/prompt-lookup-decoding 排名第 15,997。

同类别比较
名称排名指标
neptune-ai/neptune-client15,921
语言:
Python
星标数:
623
分叉数:
75
简介:
📘 The experiment tracker for foundation model training
ai365vip/chat-api15,930
语言:
JavaScript
星标数:
622
分叉数:
141
简介:
OpenAI 接口聚合管理,我们致力于提供优质的API接入服务,让您可以轻松集成先进的AI模型至您的产品和服务。
zhangfengcdt/memoir15,944
语言:
Python
星标数:
622
分叉数:
44
简介:
Hierarchical Agent Memory with Git-Like Version Control
Tlntin/Qwen-TensorRT-LLM15,963
语言:
Python
星标数:
620
分叉数:
58
apoorvumang/prompt-lookup-decoding15,997
语言:
Jupyter Notebook
星标数:
618
分叉数:
28
简介:
Simple speculative decoding technique, integrated in vLLM and transformers
algolia/instantsearch-ios16,052
语言:
Swift
星标数:
614
分叉数:
61
简介:
⚡️ A library of widgets and helpers to build instant-search applications on iOS.
openxlings/xlings16,072
语言:
C++
星标数:
613
分叉数:
51
简介:
Universal package infrastructure with OS-like SubOS isolation - Multi-version · Rootless · Decentralized Index · Agent-ready.
philipturner/metal-flash-attention16,073
语言:
Swift
星标数:
613
分叉数:
43
简介:
FlashAttention (Metal Port)
关键参数与规格
关键参数与规格
参数值
语言Swift
类别Infrastructure
子类别Data systems
关键词Client integration, Embeddings, LocalAI, Search
星标数619
分叉数37
贡献者7
创建日期2018-11-16
更新日期2026-09-08
1 天星标数0
7 天星标数0
排名15,991
上次排名15,785
排名变化-206
7 天星标排名15,285
上次 7 天星标排名15,297
7 天星标排名变化12
总星标排名16,385
上次总星标排名16,363
总星标排名变化-22
README 摘录

Getting Started • Documentation • Example Apps • Issues ObjectBox Swift Database - swiftly persist objects & vector embeddings on iOS & macOS Powerful & superfast on-device vector database for Swift that's also easy to use. Persist Swift objects quickly and reliably locally on iOS and macOS for seamless offline-first apps. With fast local vector search for powerful Edge AI features - local, private, speedy. **Read the guide** or **check out the API reference**. Why use ObjectBox for Swift data persistence? Simple but powerful; frugal but

fast: The ObjectBox NoSQL database offers an intuitive Swift API that's easy to pick up, fun to work with, and incredibly fast, making it sustainable in many ways. Its frugal resource use (CPU, memory, battery / power) makes ObjectBox an ideal and sustainable choice for iOS apps. Check out the installation section below. You can also star this repository for later 🌟 Features 🧠 **Artificial Intelligence** - superfast on-device vector search. \ 🏁 **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 Add ObjectBox to your project ObjectBox is available as a Swift Package CocoaPods pod Swift Package Instructions depend on whether you want to set up an Xcode project (to build iOS and macOS apps) or a Swift Package Manager manifest. Set up an Xcode project In Xcode, add a package dependency and search for the package URL: For the Dependency Rule, we recommend to use "Up to Next Major Version". To find the latest version to use view

the tags of the objectbox-swift-spm repository. Finally, when asked, add the to your app target. Or to use ObjectBox Sync (requires access to the Sync feature), add the instead. Now, you are all set to define your first ObjectBox entities! To continue check the Getting Started guide or the example project. Set up a Swift Package Manager manifest In your file, add the ObjectBox Swift Package repository to the block: Replace with the latest tag of the objectbox

-swift-spm repository. Add the to the of the desired target in : Or to use ObjectBox Sync (requires access to the Sync feature), add the instead: Your file should then contain sections similar to this: Now, you are all set to define your first ObjectBox entities! To continue check the Getting Started guide or the example project. CocoaPods If you are new to CocoaPods, check out their website for an introduction and installation instructions. To add the ObjectBox Swift dependency

, add the following line to your : Then install the pod and run the ObjectBox setup script: The script will configure

常见问题

记录了多少星标和分叉?

objectbox/objectbox-swift 有 619 个星标和 37 个分叉。

仓库排名是多少?

objectbox/objectbox-swift 排名第 15,991。

记录的语言和类别是什么?

objectbox/objectbox-swift 有 619 个星标,语言为 Swift,类别为 Infrastructure。

哪个仓库排名最接近?

objectbox/objectbox-swift 与 apoorvumang/prompt-lookup-decoding 比较,后者排名第 15,997,有 618 个星标。

README

Getting Started • Documentation • Example Apps • Issues

ObjectBox Swift Database - swiftly persist objects & vector embeddings on iOS & macOS

Powerful & superfast on-device vector database for Swift that's also easy to use. Persist Swift objects quickly and reliably locally on iOS and macOS for seamless offline-first apps. With fast local vector search for powerful Edge AI features - local, private, speedy.

Demo code

// objectbox: entity
class Person {
    var id: Id = 0
    var firstName: String = ""
    var lastName: String = ""
    
    init() {}
    
    init(id: Id = 0, firstName: String, lastName: String) {
        self.id = id
        self.firstName = firstName
        self.lastName = lastName
    }
}

let store = try Store(directoryPath: "person-db")
let box = store.box(for: Person.self)

var person = Person(firstName: "Joe", lastName: "Green")
let id = try box.put(person) // Create

person = try box.get(id)!    // Read

person.lastName = "Black"
try box.put(person)          // Update

try box.remove(person.id)    // Delete

let query = try box.query {  // Query
    Person.firstName == "Joe"
    && Person.lastName.startsWith("B")
}.build()
let people: [Person] = try query.find()

Want details? Read the guide or check out the API reference.

Why use ObjectBox for Swift data persistence?

Simple but powerful; frugal but fast: The ObjectBox NoSQL database offers an intuitive Swift API that's easy to pick up, fun to work with, and incredibly fast, making it sustainable in many ways. Its frugal resource use (CPU, memory, battery / power) makes ObjectBox an ideal and sustainable choice for iOS apps. So why not give it a try right away? Check out the installation section below. You can also star this repository for later 🌟

Features

🧠 Artificial Intelligence - superfast on-device vector search.
🏁 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

Add ObjectBox to your project

ObjectBox is available as a

Swift Package

Instructions depend on whether you want to set up an Xcode project (to build iOS and macOS apps) or a Swift Package Manager manifest.

Set up an Xcode project

In Xcode, add a package dependency and search for the package URL:

https://github.com/objectbox/objectbox-swift-spm

For the Dependency Rule, we recommend to use "Up to Next Major Version". To find the latest version to use view the tags of the objectbox-swift-spm repository.

Finally, when asked, add the ObjectBox.xcframework to your app target. Or to use ObjectBox Sync (requires access to the Sync feature), add the ObjectBox-Sync.xcframework instead.

Now, you are all set to define your first ObjectBox entities! To continue check the Getting Started guide or the example project.

Set up a Swift Package Manager manifest

In your Package.swift file, add the ObjectBox Swift Package repository to the dependencies block:

.package(url: "https://github.com/objectbox/objectbox-swift-spm.git", from: "INSERT_VERSION"),

Replace INSERT_VERSION with the latest tag of the objectbox-swift-spm repository.

Add the ObjectBox.xcframework to the dependencies of the desired target in targets:

.product(name: "ObjectBox.xcframework", package: "objectbox-swift-spm")

Or to use ObjectBox Sync (requires access to the Sync feature), add the ObjectBox-Sync.xcframework instead:

.product(name: "ObjectBox-Sync.xcframework", package: "objectbox-swift-spm")

Your Package.swift file should then contain sections similar to this:

dependencies: [
    .package(url: "https://github.com/objectbox/objectbox-swift-spm.git", from: "INSERT_VERSION"),
],
targets: [
  .executableTarget(
    name: "YourApp",
    dependencies: [
        .product(name: "ObjectBox.xcframework", package: "objectbox-swift-spm")
    ]),
]

Now, you are all set to define your first ObjectBox entities! To continue check the Getting Started guide or the example project.

CocoaPods

If you are new to CocoaPods, check out their website for an introduction and installation instructions.

To add the ObjectBox Swift dependency, add the following line to your Podfile:

pod 'ObjectBox'

Then install the pod and run the ObjectBox setup script:

pod install --repo-update
Pods/ObjectBox/setup.rb

The setup.rb script will configure your Xcode project to run ObjectBox generator on every build by adding a build phase (called "[OBX] Update Sourcery Generated Files") for every target with an executable.

Disable the User Script Sandboxing option in your Xcode project build settings to allow the ObjectBox generator script to run.

[!NOTE] The ObjectBox code generator needs to run in the project directory and will generate files there. If this is executed in a sandbox, the build phase will fail.

Then, open your Xcode workspace (.xcworkspace) instead of the Xcode project (.xcodeproj).

Now, you are all set to define your first ObjectBox entities! To continue check the Getting Started guide or the example project.

Troubleshoot setup issues

If installing the pod or configuring the project failed, try to update the xcodeproj and cocoapods gem:

gem update xcodeproj && gem update cocoapods && pod repo update

[!NOTE] On Apple Silicon (M1), ensure you have the latest gems for CocoaPods:

gem update ffi ethon

Update to a new version

After a new version of ObjectBox Swift is released, update the ObjectBox pod and run the setup script again:

pod repo update
pod update ObjectBox
Pods/ObjectBox/setup.rb

Recommended Xcode project settings

ObjectBox Swift does not include Bitcode, so you may need to adjust "Build Settings" in Xcode accordingly. In that tab, ensure "All" is active and search for "bitcode". You will find the "Enable Bitcode" setting which you set to "No".

Otherwise, for some build targets, you will get a build error like this:

'.../ObjectBox.framework/ObjectBox' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting 
ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target.

Example

In the 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.

Changelog

For notable and important changes in new releases, read the changelog.

Development

The source code for ObjectBox's Swift binding can be found in the Source folder of this repository.

Background: code generation

ObjectBox Swift Database uses generated code for optimal performance at runtime by avoiding reflection etc.

It uses a fork of Sourcery for this.

Already using ObjectBox?

We want to bring joy, delight and sustainability to app developers. To do this, we need your help: Please fill in this 2-minute Anonymous Feedback Form. Let us know what you love and what is amiss, so we can improve.

We're looking forward to receiving your comments and requests:

  • Add GitHub issues

  • Upvote issues you find important by hitting the 👍 reaction button

  • ⭐ this repository, 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 sustainable app development in multiple native languages:

License

Copyright 2018-2026 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 this license applies to the code in this repository only. See our website on details about all licenses for ObjectBox components.

排名相邻
同类项目