Skip to content

Fix Datadog builds on tvOS - #1361

Open
MaeIg wants to merge 2 commits into
DataDog:developfrom
MaeIg:fix-tvos-builds
Open

Fix Datadog builds on tvOS#1361
MaeIg wants to merge 2 commits into
DataDog:developfrom
MaeIg:fix-tvos-builds

Conversation

@MaeIg

@MaeIg MaeIg commented Aug 6, 2026

Copy link
Copy Markdown

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.
image

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)

  • Feature or bugfix MUST have appropriate tests
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)
  • N/A If this PR is auto-generated, please make sure also to manually update the code related to the change

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.

Copilot AI review requested due to automatic review settings August 6, 2026 14:04
@MaeIg
MaeIg requested a review from a team as a code owner August 6, 2026 14:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 DatadogWebViewTracking import from DdSdkImplementation.swift (so tvOS compilation doesn’t try to import an unavailable module).
  • Wraps the consumeWebviewEvent React Native bridge export in DdSdk.mm behind 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.

@cdn34dd

cdn34dd commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Hey @MaeIg, thanks for submitting the PR, we'll try to have a lot at it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants