Skip to content

Commit 4ee28c8

Browse files
Update READMEs: clean up, remove redundant parts, update commands.
1 parent b954ce8 commit 4ee28c8

File tree

2 files changed

+35
-67
lines changed

2 files changed

+35
-67
lines changed

Example/README.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,10 @@ The example comes with two apps: one for iOS and one for macOS. The iOS example
55

66
Example setup
77
-------------
8-
Just like in any other project, you need te setup CocoaPods and ObjectBox.
9-
Simply run `./setup.sh` inside this directory, or copy paste this into a terminal:
8+
Just like in any other project, you need to set up CocoaPods and ObjectBox.
9+
Simply run `./setup.sh` inside this directory, or run these commands in a terminal:
1010

11-
pod install # if that fails, update CocoaPods (see Installation)
11+
pod install --repo-update # if that fails, update CocoaPods (see Installation)
1212
Pods/ObjectBox/setup.rb
1313

1414
This will generate a `NotesExample.xcworkspace` that you can launch to try out ObjectBox.
15-
16-
Updating to newer ObjectBox versions
17-
------------------------------------
18-
pod repo update
19-
pod update
20-
Pods/ObjectBox/setup.rb

README.md

Lines changed: 32 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,6 @@ let oldClauses = query.find()
4545
Want details? **[Read the guides](https://swift.objectbox.io/)** or
4646
**[check out the API docs](https://objectbox.io/docfiles/swift/current/)**.
4747

48-
## Table of Contents
49-
- [Why use ObjectBox for Swift data persistence?](#why-use-objectbox-for-swift-data-persistence)
50-
- [Features](#features)
51-
- [Adding ObjectBox to your project](#adding-objectbox-to-your-project)
52-
- [New to CocoaPods?](#new-to-cocoapods)
53-
- [CocoaPods troubleshooting](#cocoapods-troubleshooting)
54-
- [Swift Versions](#swift-versions)
55-
- [Example](#example)
56-
- [Background: code generation](#background-code-generation)
57-
- [Source code](#source-code)
58-
- [Already using ObjectBox?](#already-using-objectbox)
59-
- [Cross-platform database: Mobile, Desktop, Browser, Embedded, IoT](#cross-platform-database-mobile-desktop-browser-embedded-iot)
60-
- [License](#license)
61-
6248
## Why use ObjectBox for Swift data persistence?
6349

6450
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/
8369

8470
<a name="cocoapods"></a>Adding ObjectBox to your project
8571
--------------------------------------------------------
86-
[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`:
9077

9178
```ruby
9279
pod 'ObjectBox'
9380
```
9481

95-
Then run this to install the ObjectBox framework:
82+
Then run these commands in your project directory to install the ObjectBox framework:
9683

9784
```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
10187
```
10288

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).
10690

107-
### <a name="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.
10893

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
11195

112-
```bash
113-
sudo gem install cocoapods
114-
```
96+
If `pod install` fails, try updating CocoaPods first:
11597

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:
98+
gem update xcodeproj && gem update cocoapods && pod repo update
11899

119-
```bash
120-
pod init
121-
```
100+
## Updating to newer ObjectBox versions
122101

123-
### CocoaPods troubleshooting
102+
Update the ObjectBox pod and re-run the setup script:
124103

125-
If `pod install` fails, try updating CocoaPods first:
104+
```shell
105+
pod repo update
106+
pod update ObjectBox
107+
Pods/ObjectBox/setup.rb
108+
```
126109

127-
gem update xcodeproj && gem update cocoapods && pod repo update
110+
<a name="example"></a>Example
111+
-----------------------------
112+
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.
128114

129-
### Swift versions
115+
## Swift versions
130116

131117
Here's a list of ObjectBox releases, and the Swift versions they were compiled with:
132118

@@ -144,29 +130,16 @@ Here's a list of ObjectBox releases, and the Swift versions they were compiled w
144130

145131
This might be relevant, e.g. when using Carthage. For various reasons, we recommend using the latest version.
146132

147-
<a name="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.
159136

160137
Background: code generation
161138
---------------------------
162139
ObjectBox Swift Database generates code at build time for optimal performance at runtime by avoiding reflection etc.
163140
This is automatically done for you and should be transparent.
164141
Internally, we use [a fork of Sourcery](https://github.com/objectbox/objectbox-swift-generator) for this.
165142

166-
Source code
167-
-----------
168-
Source code for ObjectBox's Swift binding can be found [in the Source folder](Source/README.md).
169-
170143
Already using ObjectBox?
171144
---------------------------
172145

@@ -197,9 +170,8 @@ ObjectBox is a cross-platform database supporting sustainable app development in
197170

198171
License
199172
-------
200-
All files in this repository are under the Apache 2 license:
201173

202-
Copyright 2018-2022 ObjectBox Ltd. All rights reserved.
174+
Copyright 2018-2023 ObjectBox Ltd. All rights reserved.
203175

204176
Licensed under the Apache License, Version 2.0 (the "License");
205177
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:
213185
See the License for the specific language governing permissions and
214186
limitations under the License.
215187

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

Comments
 (0)