Skip to content

Commit e399821

Browse files
committed
1.4.1: C API 0.11, sync annotation, internal improvements
1 parent 1189c8c commit e399821

File tree

120 files changed

+542
-388
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+542
-388
lines changed

Source/Gemfile.lock

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ GEM
22
remote: https://rubygems.org/
33
specs:
44
CFPropertyList (3.0.2)
5-
activesupport (4.2.11.1)
5+
activesupport (4.2.11.3)
66
i18n (~> 0.7)
77
minitest (~> 5.1)
88
thread_safe (~> 0.3, >= 0.3.4)
99
tzinfo (~> 1.1)
10-
algoliasearch (1.27.2)
10+
algoliasearch (1.27.3)
1111
httpclient (~> 2.8, >= 2.8.3)
1212
json (>= 1.5.1)
1313
atomos (0.1.3)
1414
claide (1.0.3)
15-
cocoapods (1.9.1)
15+
cocoapods (1.9.3)
1616
activesupport (>= 4.0.2, < 5)
1717
claide (>= 1.0.2, < 2.0)
18-
cocoapods-core (= 1.9.1)
18+
cocoapods-core (= 1.9.3)
1919
cocoapods-deintegrate (>= 1.0.3, < 2.0)
2020
cocoapods-downloader (>= 1.2.2, < 2.0)
2121
cocoapods-plugins (>= 1.0.0, < 2.0)
@@ -31,7 +31,7 @@ GEM
3131
nap (~> 1.0)
3232
ruby-macho (~> 1.4)
3333
xcodeproj (>= 1.14.0, < 2.0)
34-
cocoapods-core (1.9.1)
34+
cocoapods-core (1.9.3)
3535
activesupport (>= 4.0.2, < 6)
3636
algoliasearch (~> 1.0)
3737
concurrent-ruby (~> 1.1)
@@ -40,7 +40,7 @@ GEM
4040
netrc (~> 0.11)
4141
typhoeus (~> 1.0)
4242
cocoapods-deintegrate (1.0.4)
43-
cocoapods-downloader (1.3.0)
43+
cocoapods-downloader (1.4.0)
4444
cocoapods-plugins (1.0.0)
4545
nap
4646
cocoapods-search (1.0.0)
@@ -50,18 +50,18 @@ GEM
5050
netrc (~> 0.11)
5151
cocoapods-try (1.2.0)
5252
colored2 (3.1.2)
53-
concurrent-ruby (1.1.6)
53+
concurrent-ruby (1.1.7)
5454
escape (0.0.4)
5555
ethon (0.12.0)
5656
ffi (>= 1.3.0)
57-
ffi (1.12.2)
57+
ffi (1.13.1)
5858
fourflusher (2.3.1)
5959
fuzzy_match (2.0.4)
6060
gh_inspector (1.1.3)
6161
httpclient (2.8.3)
6262
i18n (0.9.5)
6363
concurrent-ruby (~> 1.0)
64-
jazzy (0.13.3)
64+
jazzy (0.13.5)
6565
cocoapods (~> 1.5)
6666
mustache (~> 1.1)
6767
open4
@@ -70,19 +70,19 @@ GEM
7070
sassc (~> 2.1)
7171
sqlite3 (~> 1.3)
7272
xcinvoke (~> 0.3.0)
73-
json (2.3.0)
73+
json (2.3.1)
7474
liferaft (0.0.6)
75-
minitest (5.14.0)
75+
minitest (5.14.2)
7676
molinillo (0.6.6)
7777
mustache (1.1.1)
78-
nanaimo (0.2.6)
78+
nanaimo (0.3.0)
7979
nap (1.1.0)
8080
netrc (0.11.0)
8181
open4 (1.3.4)
8282
redcarpet (3.5.0)
83-
rouge (3.18.0)
83+
rouge (3.22.0)
8484
ruby-macho (1.4.0)
85-
sassc (2.3.0)
85+
sassc (2.4.0)
8686
ffi (~> 1.9)
8787
sqlite3 (1.4.2)
8888
thread_safe (0.3.6)
@@ -92,12 +92,12 @@ GEM
9292
thread_safe (~> 0.1)
9393
xcinvoke (0.3.0)
9494
liferaft (~> 0.0.6)
95-
xcodeproj (1.16.0)
95+
xcodeproj (1.18.0)
9696
CFPropertyList (>= 2.3.3, < 4.0)
9797
atomos (~> 0.1.3)
9898
claide (>= 1.0.2, < 2.0)
9999
colored2 (~> 3.1)
100-
nanaimo (~> 0.2.6)
100+
nanaimo (~> 0.3.0)
101101

102102
PLATFORMS
103103
ruby

Source/README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
ObjectBox Swift Sources
22
=======================
3-
43
This folder contains the Swift sources for ObjectBox. This is the API you primarily touch when working with ObjectBox.
54

65
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
98
-------------------
109
- `ios-framework/`: The Cocoa Swift framework.
1110
- `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.
1415
- `docs/`: Documentation and discussion of concepts, ideas, and approaches to bring ObjectBox to Swift.
1516

1617
Setup
1718
-----
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
1920
* Note: After Xcode updates, you may have to reinstall the CLI tools via `xcode-select --install`
2021
* Ensure you have homebrew (e.g. setup.sh uses it to install [Carthage](https://github.com/Carthage/Carthage))
2122
* Using homebrew, install basic build tools like cmake and ccache
@@ -42,7 +43,8 @@ Distributing the Framework
4243

4344
Distribution of the framework as closed source works across these channels:
4445

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)
4648
- **Carthage**, by uploading a `.zip` of the frameworks as binary attachments to a GitHub's release.
4749

4850
## Build with Carthage
@@ -51,19 +53,18 @@ The easiest way to build the framework is using the dependency manager [Carthage
5153

5254
$ carthage build --no-skip-current
5355

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.
5558

5659
To generate the Carthage-compatible release:
5760

5861
$ carthage archive ObjectBox
5962

6063
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.
6164

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-
6465
## Build without Carthage
6566

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

6869
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.
6970

Source/fetch_dependencies.command

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,24 @@ if [ "$verify_only" = true ]; then
2727
else
2828

2929
if [ -d "$code_dir" ]; then # Do we have an existing code repo?
30-
cd "$code_dir" # todo fix this workaround for building into cbuild dir in "our" objectbox-swift dir
30+
pushd "$code_dir" # todo fix this workaround for building into cbuild dir in "our" objectbox-swift dir
3131
echo "Have repository, building."
3232
"$code_dir/scripts/apple-build-static-libs.sh" "$dest_dir" release
33-
exit
33+
popd
3434
else # Download static public release and unzip into $dest
3535
if [ ! -d "${dest_dir}" ] || [ ! -e "${dest_dir}/libObjectBoxCore-iOS.a" ]; then
36-
version=1.4.0
37-
c_version=0.10.0
36+
version=1.4.1
37+
c_version=0.11.0
3838
archive_path="${my_dir}/external/objectbox-static.zip"
3939
OBXLIB_URL_apple_static="https://github.com/objectbox/objectbox-swift/releases/download/v${version}/ObjectBoxCore-static-${c_version}.zip"
4040

4141
mkdir -p "${dest_dir}"
4242

4343
curl -L --fail "${OBXLIB_URL_apple_static}" --output "${archive_path}"
4444

45-
cd "${dest_dir}"
45+
pushd "${dest_dir}"
4646
unzip "${archive_path}"
47+
popd
4748

4849
if [ -d "${dest_dir}/build-artifacts/" ]; then
4950
mv "${dest_dir}/build-artifacts/"* "${dest_dir}/"
@@ -55,6 +56,9 @@ else # Download static public release and unzip into $dest
5556
fi
5657
fi # verify_only
5758

59+
# Update the header file actually used by our Swift sources
60+
cp "$dest_dir/objectbox.h" "ios-framework/CommonSource/Internal/objectbox-c.h"
61+
5862
# Print versions for allow verification of built libs (is it the one we expect?)
5963
echo "============================================================================================"
6064
echo "Please check that the found libs are available (macOS, iOS) and contain the expected symbols"

Source/ios-framework/.swiftlint-macOS.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ identifier_name:
1414
excluded:
1515
- id
1616
- ok
17-
- tx
17+
- tx
18+
type_name:
19+
excluded:
20+
- Id

0 commit comments

Comments
 (0)