Skip to content

Commit f5cef29

Browse files
buenaflorclaudecursoragent
committed
feat(apple): Re-enable watchosArm32 via spm4Kmp 1.9.3
spm4Kmp 1.9.3 adds armv7k (watchosArm32) support to its AppleCompileTarget enum, so it now generates the exported cocoapods.Sentry cinterop for that target. Bump Config.spmForKmpVersion to 1.9.3 and re-add watchosArm32() to the appleTargets list (the swiftPackageConfig forEach iterates that list). This restores the published target, so validateDistributions (expects watchosarm32, 20 artifacts) and scripts/build-apple.sh stay consistent. apiCheck is unaffected (android/jvm dumps only). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 9c90180 commit f5cef29

3 files changed

Lines changed: 11 additions & 18 deletions

File tree

SPM4KMP_MIGRATION.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,15 @@ Kotlin **2.2.21** is the first version whose cinterop commonizer supports the Xc
100100
- [x] Keep SDK-reported telemetry `SENTRY_COCOA_PACKAGE_NAME = "cocoapods:sentry-cocoa"` unchanged —
101101
`buildkonfig` block untouched.
102102

103-
### ⚠️ Phase 1 blocker — watchosArm32 (armv7k) temporarily disabled
104-
- spm4Kmp **1.9.2 does not support watchosArm32**: its `AppleCompileTarget` enum has no armv7k entry, so it
105-
never generates the `CompileSwiftPackage` / `GenerateCInteropDefinition` / exported-`Sentry` cinterop tasks
106-
for that target (verified by decompiling the plugin). Neither `remotePackageVersion` nor `remoteBinary`
107-
helps — the gap is in the plugin's per-target pipeline, not the dependency source.
108-
- This is purely a plugin limitation: Kotlin/Native cinterop itself supports armv7k (our manual
109-
`cinteropSentry.InternalWatchosArm32` builds fine), and the Sentry xcframework ships an armv7k slice.
110-
- **Temporarily disabled** `watchosArm32()` in `build.gradle.kts` (target list + swiftPackageConfig forEach),
111-
marked with a `TODO(spm4Kmp)`. Reported upstream to the spm4Kmp author.
112-
- **Must re-enable before release** (it is a published target — `validateDistributions` expects
113-
`watchosarm32`; binary-compat `apiCheck` golden may also need re-sync). Re-enable once spm4Kmp adds armv7k,
114-
or fall back to a manual header-based `cinterops.create("Sentry")` for that one target.
103+
### ✅ Phase 1 watchosArm32 (armv7k) — RESOLVED via spm4Kmp 1.9.3
104+
- spm4Kmp **1.9.2 did not support watchosArm32**: its `AppleCompileTarget` enum had no armv7k entry, so it
105+
never generated the `CompileSwiftPackage` / `GenerateCInteropDefinition` / exported-`Sentry` cinterop tasks
106+
for that target. It was therefore temporarily disabled.
107+
- **spm4Kmp 1.9.3 adds armv7k support.** Bumped `Config.spmForKmpVersion` to `1.9.3` and re-added
108+
`watchosArm32()` to the `appleTargets` list (the `swiftPackageConfig` forEach iterates that list, so the
109+
exported `cocoapods.Sentry` cinterop is now generated for armv7k too). This restores the published target
110+
so `validateDistributions` (expects `watchosarm32`, 20 artifacts) and `scripts/build-apple.sh`
111+
(`publishWatchosArm32...`) are consistent again. `apiCheck` is unaffected (android/jvm dumps only).
115112

116113
---
117114

buildSrc/src/main/java/Config.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ object Config {
77
val multiplatform = "multiplatform"
88
val cocoapods = "native.cocoapods"
99
val spmForKmp = "io.github.frankois944.spmForKmp"
10-
val spmForKmpVersion = "1.9.2"
10+
val spmForKmpVersion = "1.9.3"
1111
val jetpackCompose = "org.jetbrains.compose"
1212
val kotlinCompose = "org.jetbrains.kotlin.plugin.compose"
1313
val gradleMavenPublishPlugin = "com.vanniktech.maven.publish"

sentry-kotlin-multiplatform/build.gradle.kts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,12 @@ kotlin {
5959
jvm()
6060

6161
// Apple targets are declared once here and reused for the spm4Kmp swiftPackageConfig below.
62-
// TODO(spm4Kmp): watchosArm32 (armv7k) is temporarily disabled. spm4Kmp 1.9.2 has no
63-
// watchosArm32 entry in its AppleCompileTarget enum, so it cannot generate the exported
64-
// `cocoapods.Sentry` cinterop for it. K/N cinterop itself supports armv7k, so this is purely a
65-
// plugin gap (reported upstream). Re-add it to this list once the plugin adds armv7k support
66-
// (or via a manual header cinterop fallback).
6762
val appleTargets =
6863
listOf(
6964
iosArm64(),
7065
iosSimulatorArm64(),
7166
iosX64(),
67+
watchosArm32(),
7268
watchosArm64(),
7369
watchosX64(),
7470
watchosSimulatorArm64(),

0 commit comments

Comments
 (0)