You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 recource 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](#adding-objectbox-to-your-project). You can also star this repository for later 🌟
@@ -83,50 +69,50 @@ On top, ObjectBox comes with an [out-of-the-box Data Sync](https://objectbox.io/
83
69
84
70
<aname="cocoapods"></a>Adding ObjectBox to your project
[CocoaPods](https://cocoapods.org) is recommended to set up ObjectBox in your project.
87
-
See the [installation docs](https://swift.objectbox.io/install) for alternative setups,
88
-
or the [New to CocoaPods?](#new-to-cocoapods) section below for a quick intro.
89
-
To install the `ObjectBox` pod, add the following line to your Podfile:
72
+
ObjectBox is available as a [CocoaPods](https://cocoapods.org) pod. [See the docs](https://swift.objectbox.io/install) for details and alternative setup options.
73
+
74
+
If you are new to CocoaPods, [check out their website](https://cocoapods.org) for an introduction and installation instructions.
75
+
76
+
To add the ObjectBox Swift dependency, add the following line to your `Podfile`:
90
77
91
78
```ruby
92
79
pod 'ObjectBox'
93
80
```
94
81
95
-
Then run this to install the ObjectBox framework:
82
+
Then run these commands in your project directory to install the ObjectBox framework:
96
83
97
84
```bash
98
-
cd /path/to/your/project/folder/ # whatever folder your Podfile is in.
99
-
pod install
100
-
Pods/ObjectBox/setup.rb myproject.xcodeproj # whatever your Xcode project is named
85
+
pod install --repo-update
86
+
Pods/ObjectBox/setup.rb
101
87
```
102
88
103
-
And, don't forget to close the Xcode project (.xcodeproj) and open the workspace (.xcworkspace) instead.
104
-
Now, you are all set to define your first ObjectBox entities;
105
-
e.g. check the [getting started guide](https://swift.objectbox.io/getting-started) or the [example](#example) described below.
89
+
Then open your Xcode workspace (.xcworkspace) instead of the Xcode project (.xcodeproj).
106
90
107
-
### <aname="new-to-cocoapods"></a>New to CocoaPods?
91
+
Now, you are all set to define your first ObjectBox entities;
92
+
e.g. check the [getting started guide](https://swift.objectbox.io/getting-started) or the [example](#example) described below.
108
93
109
-
[CocoaPods](https://cocoapods.org) is a dependency manager and sets up libraries like ObjectBox in your Xcode project.
110
-
To install it, run this in a terminal:
94
+
### CocoaPods troubleshooting
111
95
112
-
```bash
113
-
sudo gem install cocoapods
114
-
```
96
+
If `pod install` fails, try updating CocoaPods first:
115
97
116
-
In CocoaPods, you keep track of used libraries in a file called "Podfile".
117
-
If you don't have this file yet, navigate to your Xcode project folder and use CocoaPods to create one:
In the [Example](Example/) directory, you'll find a "Notes" example app demonstrating ObjectBox's Swift API.
113
+
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.
128
114
129
-
###Swift versions
115
+
## Swift versions
130
116
131
117
Here's a list of ObjectBox releases, and the Swift versions they were compiled with:
132
118
@@ -144,29 +130,16 @@ Here's a list of ObjectBox releases, and the Swift versions they were compiled w
144
130
145
131
This might be relevant, e.g. when using Carthage. For various reasons, we recommend using the latest version.
146
132
147
-
<aname="example"></a>Example
148
-
-----------------------------
149
-
In the [Example](Example/) directory, you'll find a "Notes" example app demonstrating ObjectBox's Swift API.
150
-
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.
151
-
152
-
To setup the example, use CocoaPods to acquire the framework:
153
-
154
-
cd Example/
155
-
pod install # if that fails, update CocoaPods (see Installation)
156
-
Pods/ObjectBox/setup.rb
157
-
158
-
This will generate a `NotesExample.xcworkspace` that you can launch to try out ObjectBox.
133
+
Development
134
+
-----------
135
+
The source code for ObjectBox's Swift binding can be found [in the Source folder](Source/README.md) of this repository.
159
136
160
137
Background: code generation
161
138
---------------------------
162
139
ObjectBox Swift Database generates code at build time for optimal performance at runtime by avoiding reflection etc.
163
140
This is automatically done for you and should be transparent.
164
141
Internally, we use [a fork of Sourcery](https://github.com/objectbox/objectbox-swift-generator) for this.
165
142
166
-
Source code
167
-
-----------
168
-
Source code for ObjectBox's Swift binding can be found [in the Source folder](Source/README.md).
169
-
170
143
Already using ObjectBox?
171
144
---------------------------
172
145
@@ -197,9 +170,8 @@ ObjectBox is a cross-platform database supporting sustainable app development in
197
170
198
171
License
199
172
-------
200
-
All files in this repository are under the Apache 2 license:
201
173
202
-
Copyright 2018-2022 ObjectBox Ltd. All rights reserved.
174
+
Copyright 2018-2023 ObjectBox Ltd. All rights reserved.
203
175
204
176
Licensed under the Apache License, Version 2.0 (the "License");
205
177
you may not use this file except in compliance with the License.
@@ -213,3 +185,5 @@ All files in this repository are under the Apache 2 license:
213
185
See the License for the specific language governing permissions and
214
186
limitations under the License.
215
187
188
+
Note that this license applies to the code in this repository only.
189
+
See our website on details about all [licenses for ObjectBox components](https://objectbox.io/faq/#license-pricing).
0 commit comments