Skip to content

Commit 88b7c41

Browse files
Graybox CIgreenrobot-team
authored andcommitted
ObjectBox Swift database 4.4.1
1 parent d29b31f commit 88b7c41

Some content is hidden

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

44 files changed

+183
-142
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ Notable changes to the ObjectBox Swift library.
44

55
For more insights into what changed in the ObjectBox C++ core, [check the ObjectBox C changelog](https://github.com/objectbox/objectbox-c/blob/main/CHANGELOG.md).
66

7+
## 4.4.1 - 2025-09-01
8+
9+
- Update ObjectBox database to version `4.3.1-2025-08-02`.
10+
- The Swift plugin accepts arguments for the generator, like `--visiblity public`. [#101](https://github.com/objectbox/objectbox-swift/issues/101)
11+
- The generator Swift plugin asks for the network permission to send anonymous statistics. Pass the
12+
`--no-statistics` argument to not send them.
13+
714
## 4.4.0 - 2025-07-09
815

916
- **Breaking API change: when using the Swift Package, make sure to run the generator again.**
@@ -15,6 +22,7 @@ For more insights into what changed in the ObjectBox C++ core, [check the Object
1522

1623
## 4.3.0 - 2025-05-21
1724

25+
- Update ObjectBox database to version `4.3.0-2025-05-12`.
1826
- The generator supports Xcode 16 projects with buildable folders. [#94](https://github.com/objectbox/objectbox-swift/issues/94)
1927
- External property types and names (via [MongoDB connector Data Mapping](https://sync.objectbox.io/mongodb-sync-connector/mongodb-data-mapping))
2028

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Check out the [installation section below](#add-objectbox-to-your-project). You
9393
ObjectBox is available as a
9494

9595
- [CocoaPods](#cocoapods) pod
96-
- [Swift Package](https://swift.objectbox.io/install#swift-package)
96+
- [Swift Package](#swift-package)
9797

9898
### CocoaPods
9999

@@ -179,7 +179,7 @@ Now, you are all set to define your first ObjectBox entities! To continue check
179179
In your `Swift.package` file, add the ObjectBox Swift Package repository to the `dependencies` block:
180180

181181
```swift
182-
.package(url: "https://github.com/objectbox/objectbox-swift-spm.git", from: "4.4.0"),
182+
.package(url: "https://github.com/objectbox/objectbox-swift-spm.git", from: "4.4.1"),
183183
```
184184

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

Source/fetch_dependencies.command

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ set -e
1313

1414
# objectbox-swift release version on GitHub:
1515
# https://github.com/objectbox/objectbox-swift/releases/download/v${version}
16-
version=4.4.0
16+
version=4.4.1
1717

1818
# C library version attached to the GitHub release:
1919
# ObjectBoxCore-static-${c_version}.zip
20-
c_version=4.3.0
20+
c_version=4.3.1
2121

2222
# Params supported by apple-build-static-libs.sh
2323
if [ -n "$OBX_SKIP_STATIC_C_TESTS" ]; then

Source/ios-framework/CodeGenTests/RunToolTests.sh

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ if [ -z ${PROJECT_DIR} ]; then
1919
exit 1
2020
fi
2121

22+
# Set this to true to update the expected files after comparing them found a difference.
23+
# This can be helpful to mass update changed model, schema dump and generated code files.
24+
UPDATE_EXPECTED_FILES=false
25+
2226
MYDIR="${PROJECT_DIR}/CodeGenTests" # Xcode copies our script into DerivedData before running it, so hard-code our path.
2327
PARENT_DIR="$(dirname "$PROJECT_DIR")"
2428
SOURCERY_APP="${PARENT_DIR}/external/objectbox-swift-generator/bin/Sourcery.app"
@@ -73,13 +77,19 @@ test_target_num () {
7377
echo "error: $2: $1: Model files DIFFERENT!"
7478

7579
echo "====="
76-
diff "$MODEL_FILE_ACTUAL" "$MODEL_FILE_EXPECTED"
77-
echo "opendiff \"$MODEL_FILE_ACTUAL\" \"$MODEL_FILE_EXPECTED\" -merge \"$MODEL_FILE_EXPECTED\""
80+
# -C 1 to show 1 line of context around differences
81+
diff -C 1 "$MODEL_FILE_ACTUAL" "$MODEL_FILE_EXPECTED"
7882
# echo "===== $MODEL_FILE_ACTUAL ====="
7983
# cat "$MODEL_FILE_ACTUAL"
8084
# echo "===== $MODEL_FILE_EXPECTED ====="
8185
# cat "$MODEL_FILE_EXPECTED"
8286
echo "====="
87+
88+
if [ "$UPDATE_EXPECTED_FILES" = true ]; then
89+
echo "note: $2: $1: Updating expected model file."
90+
cp "$MODEL_FILE_ACTUAL" "$MODEL_FILE_EXPECTED"
91+
fi
92+
8393
FAIL=1
8494
fi
8595
fi
@@ -92,13 +102,19 @@ test_target_num () {
92102
echo "error: $2: $1: Output files DIFFERENT!"
93103

94104
echo "====="
95-
diff "$ENTITY_INFO_FILE_ACTUAL" "$ENTITY_INFO_FILE_EXPECTED"
96-
# echo "opendiff \"$ENTITY_INFO_FILE_ACTUAL\" \"$ENTITY_INFO_FILE_EXPECTED\" -merge \"$ENTITY_INFO_FILE_EXPECTED\""
105+
# -C 1 to show 1 line of context around differences
106+
diff -C 1 "$ENTITY_INFO_FILE_ACTUAL" "$ENTITY_INFO_FILE_EXPECTED"
97107
# echo "===== $ENTITY_INFO_FILE_ACTUAL ====="
98108
# cat "$ENTITY_INFO_FILE_ACTUAL"
99109
# echo "===== $ENTITY_INFO_FILE_EXPECTED ====="
100110
# cat "$ENTITY_INFO_FILE_EXPECTED"
101111
echo "====="
112+
113+
if [ "$UPDATE_EXPECTED_FILES" = true ]; then
114+
echo "note: $2: $1: Updating expected entity info file."
115+
cp "$ENTITY_INFO_FILE_ACTUAL" "$ENTITY_INFO_FILE_EXPECTED"
116+
fi
117+
102118
FAIL=1
103119
fi
104120
fi
@@ -111,12 +127,19 @@ test_target_num () {
111127
echo "error: $2: $1: Schema dumps DIFFERENT!"
112128

113129
echo "====="
114-
echo "opendiff \"$DUMP_FILE_ACTUAL\" \"$DUMP_FILE_EXPECTED\" -merge \"$DUMP_FILE_EXPECTED\""
130+
# -C 1 to show 1 line of context around differences
131+
diff -C 1 "$DUMP_FILE_ACTUAL" "$DUMP_FILE_EXPECTED"
115132
# echo "===== $DUMP_FILE_ACTUAL ====="
116133
# cat "$DUMP_FILE_ACTUAL"
117134
# echo "===== $DUMP_FILE_EXPECTED ====="
118135
# cat "$DUMP_FILE_EXPECTED"
119136
echo "====="
137+
138+
if [ "$UPDATE_EXPECTED_FILES" = true ]; then
139+
echo "note: $2: $1: Updating expected schema dump file."
140+
cp "$DUMP_FILE_ACTUAL" "$DUMP_FILE_EXPECTED"
141+
fi
142+
120143
FAIL=1
121144
fi
122145
fi
@@ -226,12 +249,19 @@ fail_codegen_target_num () {
226249
echo "error: $2: $1: Model files DIFFERENT!"
227250

228251
echo "====="
229-
echo "opendiff \"$MODEL_FILE_ACTUAL\" \"$MODEL_FILE_EXPECTED\" -merge \"$MODEL_FILE_EXPECTED\""
252+
# -C 1 to show 1 line of context around differences
253+
diff -C 1 "$MODEL_FILE_ACTUAL" "$MODEL_FILE_EXPECTED"
230254
# echo "===== $MODEL_FILE_ACTUAL ====="
231255
# cat "$MODEL_FILE_ACTUAL"
232256
# echo "===== $MODEL_FILE_EXPECTED ====="
233257
# cat "$MODEL_FILE_EXPECTED"
234258
echo "====="
259+
260+
if [ "$UPDATE_EXPECTED_FILES" = true ]; then
261+
echo "note: $2: $1: Updating expected model file."
262+
cp "$MODEL_FILE_ACTUAL" "$MODEL_FILE_EXPECTED"
263+
fi
264+
235265
FAIL=1
236266
fi
237267
fi
@@ -253,7 +283,8 @@ fail_codegen_target_num () {
253283
echo "error: $2: $1: Xcode log files DIFFERENT!"
254284

255285
echo "====="
256-
echo "opendiff \"$TESTXCODELOGFILE\" \"$ORIGINALXCODELOGFILE\" -merge \"$ORIGINALXCODELOGFILE\""
286+
# -C 1 to show 1 line of context around differences
287+
diff -C 1 "$TESTXCODELOGFILE" "$ORIGINALXCODELOGFILE"
257288
# echo "===== $TESTXCODELOGFILE ====="
258289
# cat "$TESTXCODELOGFILE"
259290
# echo "===== $ORIGINALXCODELOGFILE ====="

Source/ios-framework/CodeGenTests/expected/model/model1.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"name": "BusRoute",
1010
"properties": [
1111
{
12-
"flags": 1,
1312
"id": "1:7895576389419683840",
1413
"name": "id",
15-
"type": 6
14+
"type": 6,
15+
"flags": 1
1616
},
1717
{
1818
"id": "2:6687926154759915520",

Source/ios-framework/CodeGenTests/expected/model/model12.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"name": "BusRoute",
1010
"properties": [
1111
{
12-
"flags": 1,
1312
"id": "1:7895576389419683840",
1413
"name": "id",
15-
"type": 6
14+
"type": 6,
15+
"flags": 1
1616
}
1717
],
1818
"relations": []

Source/ios-framework/CodeGenTests/expected/model/model13.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"name": "BusRoute",
1010
"properties": [
1111
{
12-
"flags": 1,
1312
"id": "1:7895576389419683840",
1413
"name": "id",
15-
"type": 6
14+
"type": 6,
15+
"flags": 1
1616
},
1717
{
1818
"id": "3:14592",

Source/ios-framework/CodeGenTests/expected/model/model14.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"name": "BusRoute",
1010
"properties": [
1111
{
12-
"flags": 1,
1312
"id": "1:7895576389419683840",
1413
"name": "id",
15-
"type": 6
14+
"type": 6,
15+
"flags": 1
1616
},
1717
{
1818
"id": "3:14592",

Source/ios-framework/CodeGenTests/expected/model/model15.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"name": "BusRoute",
1010
"properties": [
1111
{
12-
"flags": 1,
1312
"id": "1:14592",
1413
"name": "id",
15-
"type": 6
14+
"type": 6,
15+
"flags": 1
1616
},
1717
{
1818
"id": "2:16640",

0 commit comments

Comments
 (0)