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
Copy file name to clipboardExpand all lines: Source/README.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,5 @@
1
1
ObjectBox Swift Sources
2
2
=======================
3
-
4
3
This folder contains the Swift sources for ObjectBox. This is the API you primarily touch when working with ObjectBox.
5
4
6
5
These Swift classes internally use [ObjectBox's C API](https://github.com/objectbox/objectbox-c), implemented by the libObjectBoxCore library.
@@ -9,13 +8,15 @@ Repository Contents
9
8
-------------------
10
9
-`ios-framework/`: The Cocoa Swift framework.
11
10
-`docs/swift_output/`: The generated framework documentation.
12
-
-`external/`: git submodule and pre-built binary container. This contains the ObjectBoxCore static libraries and our code generator.
13
-
-`fetch_dependencies.command`: Script for downloading libObjectBoxCore into `externals`. You must run this script before you can build the framework.
11
+
-`external/`: git submodule and pre-built binary container.
12
+
This contains the ObjectBoxCore static libraries and our code generator.
13
+
-`fetch_dependencies.command`: Script for downloading libObjectBoxCore into `externals`.
14
+
You must run this script before you can build the framework.
14
15
-`docs/`: Documentation and discussion of concepts, ideas, and approaches to bring ObjectBox to Swift.
15
16
16
17
Setup
17
18
-----
18
-
* Install latest Xcode (Swift 5.2+) with command line tools prepared to build from the shell
19
+
* Install latest Xcode (Swift 5.3+) with command line tools prepared to build from the shell
19
20
* Note: After Xcode updates, you may have to reinstall the CLI tools via `xcode-select --install`
20
21
* Ensure you have homebrew (e.g. setup.sh uses it to install [Carthage](https://github.com/Carthage/Carthage))
21
22
* Using homebrew, install basic build tools like cmake and ccache
@@ -42,7 +43,8 @@ Distributing the Framework
42
43
43
44
Distribution of the framework as closed source works across these channels:
44
45
45
-
-**CocoaPods**, by setting the `.podspec`'s `vendored_frameworks` to point to the build products of the macOS and iOS framework targets. (The `make-release.command` script takes care of this)
46
+
-**CocoaPods**, by setting the `.podspec`'s `vendored_frameworks` to point to the build products of the macOS and iOS framework targets.
47
+
(The `make-release.command` script takes care of this)
46
48
-**Carthage**, by uploading a `.zip` of the frameworks as binary attachments to a GitHub's release.
47
49
48
50
## Build with Carthage
@@ -51,19 +53,18 @@ The easiest way to build the framework is using the dependency manager [Carthage
51
53
52
54
$ carthage build --no-skip-current
53
55
54
-
In addition to building the dependencies (there are none), the `--no-skip-current` flag ensures the current project itself is built. That's what we'll be shipping with both Carthage and CocoaPods.
56
+
In addition to building the dependencies (there are none), the `--no-skip-current` flag ensures the current project itself is built.
57
+
That's what we'll be shipping with both Carthage and CocoaPods.
55
58
56
59
To generate the Carthage-compatible release:
57
60
58
61
$ carthage archive ObjectBox
59
62
60
63
This will put all build products in a `.zip`. On client machines, Carthage downloads and unzips the contents into their local framework build directory next to other dependencies that may be built from source.
61
64
62
-
Note that the build products built with Swift 4.2 will not be compatible with Swift 5 onward. So we have to ship updated binaries until Swift reaches ABI stability, lest the releases become useless.
63
-
64
65
## Build without Carthage
65
66
66
-
You need a "fat" framework that works both on the iPhone Simulator on macOS (x86 architecture) and real devices (armv7 and arm64 architectures).
67
+
You need a "fat" framework that works both on the iPhone Simulator on macOS (x64) and real devices (arm64).
67
68
68
69
The `iOS-Fat-Framework` target compiles for both architectures and merges the results into a single build product: a single framework, and a single dSYM file.
0 commit comments