Skip to content

update client code ios build tags to add tvos target#5210

Closed
shuuri-labs wants to merge 1 commit intomainfrom
bug/update-ios-client-code-build-tags
Closed

update client code ios build tags to add tvos target#5210
shuuri-labs wants to merge 1 commit intomainfrom
bug/update-ios-client-code-build-tags

Conversation

@shuuri-labs
Copy link
Copy Markdown
Contributor

@shuuri-labs shuuri-labs commented Jan 29, 2026

Describe your changes

build tags were added to the ios client code: go:build ios. these should also reference the tvos target: go:build ios || tvos

Issue ticket number and link

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

Summary by CodeRabbit

  • New Features
    • Added tvOS support to the NetBird client, enabling compatibility with Apple TV devices alongside existing iOS and Android platforms.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 29, 2026

📝 Walkthrough

Walkthrough

This PR expands build constraints across 19 files to include tvOS support alongside iOS (and Android where applicable). All changes are build-tag modifications only—no functional code, API, or logic alterations.

Changes

Cohort / File(s) Summary
Interface Layer
client/iface/iface_new_ios.go, client/iface/udpmux/mux_ios.go
Build tags expanded from //go:build ios to //go:build ios || tvos.
Internal Debug & Mobile Support
client/internal/debug/debug_mobile.go, client/internal/dns/unclean_shutdown_mobile.go, client/internal/dns/upstream_ios.go, client/internal/networkmonitor/monitor_mobile.go
Build tags updated to include tvOS alongside iOS and/or Android: iosios || tvos or ios || androidios || tvos || android.
Route Management
client/internal/routemanager/dynamic/route_ios.go, client/internal/routemanager/notifier/notifier_ios.go, client/internal/routemanager/systemops/systemops_ios.go
Build tags expanded from //go:build ios to //go:build ios || tvos.
iOS SDK
client/ios/NetBirdSDK/client.go, client/ios/NetBirdSDK/env_list.go, client/ios/NetBirdSDK/gomobile.go, client/ios/NetBirdSDK/logger.go, client/ios/NetBirdSDK/login.go, client/ios/NetBirdSDK/peer_notifier.go, client/ios/NetBirdSDK/preferences.go, client/ios/NetBirdSDK/preferences_test.go, client/ios/NetBirdSDK/routes.go
Build tags broadened from //go:build ios to //go:build ios || tvos across the SDK implementation.
Network Support
client/net/listen_ios.go
Build tag updated from //go:build ios to //go:build ios || tvos.
Management Testing
management/server/testutil/store_ios.go
Build tag expanded from //go:build ios to //go:build ios || tvos.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested reviewers

  • pascal-fischer
  • pappz

Poem

🐰 Hops through platforms new,
iOS, tvOS too!
Build tags expand wide,
With tvos by iOS's side,
More screens to view the NetBird's brew! 📺✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: updating iOS build tags across client code to add tvOS support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description adequately covers the changes and follows the template structure with all critical sections populated.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@shuuri-labs shuuri-labs marked this pull request as ready for review January 29, 2026 11:09
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@client/net/listen_ios.go`:
- Line 1: The file contains an invalid Go build constraint using "tvos" which Go
does not recognize; update the build tag in the top of listen_ios.go by removing
the "|| tvos" clause so the build constraint is only "//go:build ios" (locate
the file's existing build line at the very top and replace it accordingly).
🧹 Nitpick comments (2)
client/iface/udpmux/mux_ios.go (1)

1-7: LGTM!

The build tag expansion is correct. tvOS shares the same sandboxing restrictions as iOS regarding low-level network hooks, so the no-op implementation is appropriate for both platforms.

💡 Optional: Update the comment to reflect both platforms
 func (m *SingleSocketUDPMux) notifyAddressRemoval(addr string) {
-	// iOS doesn't support nbnet hooks, so this is a no-op
+	// iOS/tvOS doesn't support nbnet hooks, so this is a no-op
 }
client/internal/routemanager/notifier/notifier_ios.go (1)

1-1: LGTM!

The build tag expansion is correct. The iOS-specific networking behavior (no-op stubs for initial routes, network change notifications via listener) applies equally to tvOS.

💡 Optional: Update iOS-specific comments to reflect both platforms
 func (n *Notifier) SetInitialClientRoutes([]*route.Route, []*route.Route) {
-	// iOS doesn't care about initial routes
+	// iOS/tvOS doesn't care about initial routes
 }

 func (n *Notifier) OnNewRoutes(route.HAMap) {
-	// Not used on iOS
+	// Not used on iOS/tvOS
 }

Comment thread client/net/listen_ios.go
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.

1 participant