From 5409730de8f18ca1b5d0b2b63b21a7fbe575a0a0 Mon Sep 17 00:00:00 2001 From: Bart Louwers Date: Thu, 27 Nov 2025 18:10:17 +0100 Subject: [PATCH] Fix static XCFramework creation (#3862) --- .github/workflows/ios-ci.yml | 6 +++++- MODULE.bazel | 2 +- platform/ios/BUILD.bazel | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ios-ci.yml b/.github/workflows/ios-ci.yml index f9905ecec..f22d72984 100644 --- a/.github/workflows/ios-ci.yml +++ b/.github/workflows/ios-ci.yml @@ -252,13 +252,17 @@ jobs: with: node-version-file: ".nvmrc" - - name: Build XCFramework + - name: Build XCFramework (Dynamic) if: env.make_release run: | bazel build --compilation_mode=opt --features=dead_strip,thin_lto --objc_enable_binary_stripping \ --apple_generate_dsym --output_groups=+dsyms --//:renderer=metal //platform/ios:MapLibre.dynamic --embed_label=maplibre_ios_"$(cat VERSION)" echo xcframework="$(bazel info execution_root)"/"$(bazel cquery --output=files --compilation_mode=opt --//:renderer=metal //platform/ios:MapLibre.dynamic)" >> "$GITHUB_ENV" + - name: Build XCFramework (Static) + # for now, just build it TODO: make a static framework release + run: bazel build //platform/ios:MapLibre.static --//:renderer=metal --compilation_mode="opt" --copt -g --copt="-Oz" --strip never --output_groups=+dsyms --apple_generate_dsym + - name: Create .zip with debug symbols if: env.make_release working-directory: ./bazel-bin/platform/ios/MapLibre.dynamic_dsyms diff --git a/MODULE.bazel b/MODULE.bazel index 916628c0f..a45d1bcbc 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -2,7 +2,7 @@ module(name = "maplibre") bazel_dep(name = "bazel_skylib", version = "1.8.2") bazel_dep(name = "platforms", version = "1.0.0") -bazel_dep(name = "rules_apple", version = "4.2.0") +bazel_dep(name = "rules_apple", version = "4.3.2") bazel_dep(name = "rules_swift", version = "3.3.0") bazel_dep(name = "rules_xcodeproj", version = "3.3.0") bazel_dep(name = "aspect_rules_js", version = "2.8.1") diff --git a/platform/ios/BUILD.bazel b/platform/ios/BUILD.bazel index 99ee205ce..b237f3866 100644 --- a/platform/ios/BUILD.bazel +++ b/platform/ios/BUILD.bazel @@ -102,7 +102,9 @@ public_hdrs = [ apple_static_xcframework( name = "MapLibre.static", + bundle_id = "com.maplibre.mapbox", bundle_name = "MapLibre", + infoplists = ["info_static_plist"], ios = { "simulator": [ "x86_64", @@ -112,6 +114,7 @@ apple_static_xcframework( }, minimum_os_versions = {"ios": "12.0"}, public_hdrs = public_hdrs, + version = ":maplibre_ios_version", visibility = ["//visibility:public"], deps = ["//platform:ios-sdk"], )