Skip to content

fix(build): link WebRTC.xcframework into iOS Kotlin/Native test binaries#317

Merged
formatBCE merged 1 commit intodevfrom
feat/webrtc-test-linkage
May 2, 2026
Merged

fix(build): link WebRTC.xcframework into iOS Kotlin/Native test binaries#317
formatBCE merged 1 commit intodevfrom
feat/webrtc-test-linkage

Conversation

@teancom
Copy link
Copy Markdown
Contributor

@teancom teancom commented May 2, 2026

I left the comment long on this one, because it's non-obvious why we have to do this even though none of the iOS tests actually test WebRTC (at least, as of now). I can trim it down if you want.

Without this, :composeApp:linkDebugTest* (and every iOS test target downstream of it — iosArm64Test, iosSimulatorArm64Test, iosX64Test) fails with ld: framework 'WebRTC' not found, blocking iOS test execution entirely.

The main framework is built static and defers WebRTC resolution to the iOS app's final Xcode link, where iosApp/Frameworks/WebRTC.xcframework is on the framework search path. K/N test executables are standalone binaries linked by ld directly and don't go through that wiring, so we point them at the matching slice of the bundled XCFramework:

  • Device (iosArm64) → ios-arm64
  • Simulator (iosSimulatorArm64, iosX64) → ios-arm64_x86_64-simulator

Verified: linkDebugTestIosArm64, linkDebugTestIosSimulatorArm64, and iosSimulatorArm64Test all succeed against the failure reproduced on clean origin/dev.

Without this, `:composeApp:linkDebugTest*` (and every iOS test target
downstream of it — `iosArm64Test`, `iosSimulatorArm64Test`,
`iosX64Test`) fails with `ld: framework 'WebRTC' not found`, blocking
iOS test execution entirely.

The main framework is built static and defers WebRTC resolution to the
iOS app's final Xcode link, where `iosApp/Frameworks/WebRTC.xcframework`
is on the framework search path. K/N test executables are standalone
binaries linked by `ld` directly and don't go through that wiring, so
we point them at the matching slice of the bundled XCFramework:

- Device (iosArm64) → `ios-arm64`
- Simulator (iosSimulatorArm64, iosX64) → `ios-arm64_x86_64-simulator`

Verified: `linkDebugTestIosArm64`, `linkDebugTestIosSimulatorArm64`,
and `iosSimulatorArm64Test` all succeed against the failure reproduced
on clean origin/dev.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@teancom teancom self-assigned this May 2, 2026
@teancom teancom added bug Something isn't working ios iOS platform labels May 2, 2026
@formatBCE formatBCE merged commit ef45bf3 into dev May 2, 2026
3 checks passed
@formatBCE formatBCE deleted the feat/webrtc-test-linkage branch May 2, 2026 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ios iOS platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants