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
This contains the ObjectBoxCore static libraries and the [ObjectBox Swift code generator](https://github.com/objectbox/objectbox-swift-generator).
13
13
@@ -22,39 +22,39 @@ These Swift classes internally use [ObjectBox's C API](https://github.com/object
22
22
23
23
ObjectBox comes with a couple of tests of different categories:
24
24
25
-
* Unit tests: `ios-framework/CommonTests`, based on XCTestCase
26
-
* Integration tests (see [README](ios-framework/CodeGenTests/README.md)): `ios-framework/CodeGenTests` are run by building the CodenGenTests target with Xcode/xcodebuild (which runs a script that must be launched by Xcode/xcodebuild);
25
+
- Unit tests: `ios-framework/CommonTests`, based on XCTestCase
26
+
- Generator tests (see [README](ios-framework/CodeGenTests/README.md)): `ios-framework/CodeGenTests` are run by building the CodenGenTests target with Xcode/xcodebuild (which runs a script that must be launched by Xcode/xcodebuild);
27
27
uses a separate Xcode project and an ObjectBox generator executable to generate actual binding classes and assert the generator and database operations.
28
-
* (Outdated) Integration tests "IntegrationTests": `ios-framework/IntegrationTests`, currently not maintained, run via script;
28
+
- (Outdated) Integration tests "IntegrationTests": `ios-framework/IntegrationTests`, currently not maintained, run via script;
29
29
somewhat similar to CodeGen; subject to a general clean up; see [README](ios-framework/IntegrationTests/Readme.md)
30
-
* External integration test project: https://github.com/objectbox/objectbox-swift-integration-test
30
+
- External integration test project: https://github.com/objectbox/objectbox-swift-integration-test
31
31
runs "real projects" with "full ObjectBox round-trip" on internal CI and CircleCI
32
32
33
33
### Xcode Project Organization
34
34
35
35
You look at and build the framework itself via `ios-framework/ObjectBox.xcodeproj`.
36
36
37
-
*`ObjectBox.xcproject` targets
38
-
*`ObjectBox-macOS`, `ObjectBox-iOS` and `ObjectBox-iOS Simulator` build the `ObjectBox.framework` for each platform
39
-
*`ObjectBoxTests-macOS`, `ObjectBoxTests-iOS` and `ObjectBoxTests-iOS Simulator` build unit tests for each platforms framework
40
-
*`iOS-Fat-Framework` builds a universal binary of the iOS framework needed for distribution, with code both for device and simulator
41
-
*`CodeGenTests` runs a script that runs generator and integration tests, see notes for tests above
42
-
*`ObjectBox.xcproject` main groups and directories
43
-
*`CommonSource` contains all code to be shared by the framework of the macOS and iOS platforms.
44
-
*`ObjectBox.h` is the framework umbrella header where all public C and ObjC header files are listed. These are either intended for use by app developers, or required to be visible for the Swift extensions.
45
-
*`objectbox-c.h` and `objectbox-c-sync.h` are modified copies of the C API's header files created by the `fetch_dependencies.command` script so they can be imported into Swift and do not collide with `ObjectBox.h` on case-insensitive file systems.
46
-
* The directory itself contains general purpose types like `Store` and `Box`. The important sub-groups are `Entities`, `Relation`, and `Query`.
47
-
*`CommonTests` contains all code to be shared by tests for the macOS and iOS platforms, see notes on tests above
48
-
*`ObjectBox-macOS`, `ObjectBox-iOS` and `ObjectBox-iOS Simulator` contain platform-specific files, including the framework's Info.plist
37
+
-`ObjectBox.xcproject` targets
38
+
-`ObjectBox-macOS`, `ObjectBox-iOS` and `ObjectBox-iOS Simulator` build the `ObjectBox.framework` for each platform
39
+
-`ObjectBoxTests-macOS`, `ObjectBoxTests-iOS` and `ObjectBoxTests-iOS Simulator` build unit tests for each platforms framework
40
+
-`iOS-Fat-Framework` builds a universal binary of the iOS framework needed for distribution, with code both for device and simulator
41
+
-`CodeGenTests` runs a script that runs generator tests, see notes for tests above
42
+
-`ObjectBox.xcproject` main groups and directories
43
+
-`CommonSource` contains all code to be shared by the framework of the macOS and iOS platforms.
44
+
-`ObjectBox.h` is the framework umbrella header where all public C and ObjC header files are listed. These are either intended for use by app developers, or required to be visible for the Swift extensions.
45
+
-`objectbox-c.h` and `objectbox-c-sync.h` are modified copies of the C API's header files created by the `fetch_dependencies.command` script so they can be imported into Swift and do not collide with `ObjectBox.h` on case-insensitive file systems.
46
+
- The directory itself contains general purpose types like `Store` and `Box`. The important sub-groups are `Entities`, `Relation`, and `Query`.
47
+
-`CommonTests` contains all code to be shared by tests for the macOS and iOS platforms, see notes on tests above
48
+
-`ObjectBox-macOS`, `ObjectBox-iOS` and `ObjectBox-iOS Simulator` contain platform-specific files, including the framework's Info.plist
49
49
50
50
## Development
51
51
52
-
* Ensure the latest Xcode is installed (Swift 5.3+, command line tools should be included).
53
-
* Ensure [homebrew](https://brew.sh/) is installed, e.g. setup.sh uses it.
54
-
* Ensure [rbenv](https://github.com/rbenv/rbenv) and ruby is installed, see section below.
55
-
* Run `./setup.sh` or see [setup.sh](setup.sh) and only run what is needed.
56
-
* Runs `brew bundle` to install or update basic build tools including [Carthage](https://github.com/Carthage/Carthage) (see [Brewfile](Brewfile)).
57
-
* Runs `bundle install` to install or update cocoapods and jazzy (see [Gemfile](Gemfile)).
52
+
- Ensure the latest Xcode is installed (Swift 5.3+, command line tools should be included).
53
+
- Ensure [homebrew](https://brew.sh/) is installed, e.g. setup.sh uses it.
54
+
- Ensure [rbenv](https://github.com/rbenv/rbenv) and ruby is installed, see section below.
55
+
- Run `./setup.sh` or see [setup.sh](setup.sh) and only run what is needed.
56
+
- Runs `brew bundle` to install or update basic build tools including [Carthage](https://github.com/Carthage/Carthage) (see [Brewfile](Brewfile)).
57
+
- Runs `bundle install` to install or update cocoapods and jazzy (see [Gemfile](Gemfile)).
58
58
59
59
Open the Xcode project in `ios-framework/ObjectBox.xcodeproj`.
60
60
@@ -73,21 +73,24 @@ make build_framework
73
73
make test
74
74
# Execute specific tests
75
75
make unit_tests
76
-
make integration_tests
76
+
make generator_tests
77
77
```
78
78
79
79
**To execute a specific test** change the last argument to specify your test. You can also execute a group/class by removing the last one/two parts of the filter.
80
-
Note: `xcpretty` cleans up the output so you won't see all the compiler calls but it also hides failed tests output. So once you see a failure, run without `xcpretty` to read the error.
81
-
```shell script
80
+
Note: `xcpretty` cleans up the output so you won't see all the compiler calls but it also hides failed tests output. So once you see a failure, run without `xcpretty` to read the error.
0 commit comments