Fix Datadog builds on tvOS - #1361
Open
MaeIg wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes tvOS build failures in the iOS core module by ensuring WebView tracking code is only compiled/exposed on iOS, aligning with the fact that the WebView integration is not supported on tvOS.
Changes:
- Removes an unconditional
DatadogWebViewTrackingimport fromDdSdkImplementation.swift(so tvOS compilation doesn’t try to import an unavailable module). - Wraps the
consumeWebviewEventReact Native bridge export inDdSdk.mmbehind an iOS-only compile check.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/core/ios/Sources/DdSdkImplementation.swift | Avoids importing DatadogWebViewTracking unconditionally so tvOS builds don’t fail on missing module import. |
| packages/core/ios/Sources/DdSdk.mm | Guards the consumeWebviewEvent RN method export behind an iOS-only conditional to prevent tvOS build issues. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
Hey @MaeIg, thanks for submitting the PR, we'll try to have a lot at it soon. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
The PR fixes the build on tvOS. It was partially done here, but one import and one "if" were missing.

It is a patch that we have on our project, but it would be better to have it here.
Motivation
Fixing the source instead of maintaining a patch.
Additional Notes
Review checklist (to be filled by reviewers)
I didn't submit an issue before the PR because I think it was simply an oversight and emoving the DatadogWebViewTracking imports for tvOS was already planned.