Skip to content

Commit

Permalink
Updated files and documentation for iOS 18 support. (#74)
Browse files Browse the repository at this point in the history
Added `ios_test_runner` to all unit tests, and updated the documentation
to provide debugging steps if tests fail due to a device/version
mismatch.

---------

Co-authored-by: Matt Robinson <mattrob@hey.com>
  • Loading branch information
ShadowBearVR and mattrobmattrob authored Jan 27, 2025
1 parent 84cf00d commit e0439dd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ $ bazel build //app
$ bazel test $(bazel query 'kind(ios_unit_test,//...)')
```

If the tests fail, run `xcrun simctl list devices` to check what devices and OS versions are locally available. iOS version is set in [`shared.bzl`](/tools/shared.bzl).

## Underlying Tools

- [`rules_apple`](https://github.com/bazelbuild/rules_apple)
Expand Down
3 changes: 2 additions & 1 deletion modules/API/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test")
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
load("//tools:shared.bzl", "versions")
load("//tools:shared.bzl", "default_test_runner", "versions")

# Code

Expand Down Expand Up @@ -35,4 +35,5 @@ ios_unit_test(
minimum_os_version = versions.minimum_ios_version,
visibility = ["//modules:default_test_visibility"],
deps = [":APITestsLib"],
runner = default_test_runner,
)
3 changes: 2 additions & 1 deletion modules/Models/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test")
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
load("//tools:shared.bzl", "versions")
load("//tools:shared.bzl", "default_test_runner", "versions")

# Code

Expand Down Expand Up @@ -32,4 +32,5 @@ ios_unit_test(
minimum_os_version = versions.minimum_ios_version,
visibility = ["//modules:default_test_visibility"],
deps = [":ModelsTestsLib"],
runner = default_test_runner,
)
4 changes: 3 additions & 1 deletion tools/shared.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ app_info = struct(
)

versions = struct(
minimum_ios_version = "16.0",
minimum_ios_version = "18.0",
)

default_test_runner = Label("@build_bazel_rules_apple//apple/testing/default_runner:ios_xctestrun_random_runner")

0 comments on commit e0439dd

Please sign in to comment.