Zoltan Papp 3f67c8b397 Fix route status indicator for dynamic (DNS) routes (#117)
* fix(iOS): correct route status indicator for dynamic (DNS) routes

The status indicator stayed yellow forever for dynamic routes because
the previous logic searched for the literal "invalid Prefix" sentinel
inside domain strings, which never matched.

Match the Android client's logic: a dynamic route is "connected" (green)
when any resolved IP for one of its domains appears in a Connected peer's
route list. Compare addresses with the CIDR mask stripped, since peer
routes carry /32 suffixes while resolved IPs do not.

Switch the bridge DTO from a comma-joined ResolvedIPs string to a
structured [String] list (mirrors Android's ResolvedIPs collection in
client/android/network_domains.go), so consumers no longer depend on
the Go-side string formatting.

Bumps netbird-core submodule.

* debug(iOS): log status indicator decisions in RouteCard

Adds verbose NSLog output explaining why each route card resolves to
gray, yellow, or green. To be reverted once the dynamic-route status
indicator regression is diagnosed.

* debug(iOS): route status indicator decisions to AppLogger

Replace NSLog with AppLogger.shared.log so traces land in the shared
swift-log.log file. Deduplicate per-route decisions so SwiftUI
re-renders don't flood the rotating log.

* fix(iOS): drop "invalid Prefix" sentinel, align with Android route logic

The bridge now exposes Domains.SafeString() as the Network value for
dynamic (DNS) routes, matching the Android client. That string also
appears in peer.routes (it's what dynamic.Route.String() returns), so
a single peer.routes.contains(route.network) check works for both
static and dynamic routes — no sentinel branching needed.

Replace "invalid Prefix" checks with route.domains presence checks in
the status indicator, route display text, and tooltip detail view, on
both iOS and tvOS.

Bumps netbird-core submodule.

* chore(iOS): remove RouteCard status-indicator debug logging

Diagnosis is complete; the verbose AppLogger output and dedup cache
in statusIndicatorColor are no longer needed.

* chore(iOS): point netbird-core submodule at merged upstream commit

The bridge change (structured ResolvedIPs collection + dynamic-route
Network exposure) has landed on the netbird-core main branch as
f23aaa9ae. Replace the local feature-branch SHA with the merged one.
2026-05-07 13:19:56 +02:00
2026-04-22 10:06:51 +02:00
2024-02-28 19:22:16 +01:00
2024-02-28 19:22:16 +01:00
2024-02-28 19:22:16 +01:00
2024-02-28 19:22:16 +01:00


Start using NetBird at netbird.io
See Documentation
Join our Slack channel


NetBird iOS & tvOS Client

The NetBird iOS/tvOS client allows connections from mobile devices running iOS 14.0+ and Apple TV running tvOS 17.0+ to private resources in the NetBird network.

Install

You can download and install the app from the App Store:

Download on the App Store

Screenshots

mainscreen peer-overview menu

Code structure

The code is divided into 4 parts:

  • The main netbird Go code, included as a git submodule at /netbird-core from the NetBird repo, compiled into an xcframework. This contains most of the client logic.
  • The network extension /NetbirdNetworkExtension that is running in the background where the compiled Go code is executed.
  • The UI and app code under /NetBird
  • The /NetbirdKit/NetworkExtensionAdapter that controls the extension and builds the link between UI and extension

Requirements

  • iOS 14.0+ / tvOS 17.0+
  • Xcode 16.1+
  • Go (version determined by the netbird submodule's go.mod)
  • gomobile (for iOS builds)
  • gomobile-netbird (for tvOS builds — NetBird's fork with tvOS support)

gomobile

For iOS-only builds, install the standard gomobile:

go install golang.org/x/mobile/cmd/gomobile@latest

gomobile-netbird

For tvOS builds, install gomobile-netbird, NetBird's fork of gomobile that adds tvOS support. See: https://github.com/netbirdio/gomobile-tvos-fork

go install github.com/netbirdio/gomobile-tvos-fork/cmd/gomobile-netbird@latest

Run locally

The main netbird Go code is included as a git submodule at netbird-core/.

git clone --recursive https://github.com/netbirdio/ios-client.git
cd ios-client

If you already cloned without --recursive:

git submodule update --init --recursive

Build the XCFramework for iOS:

./build-go-lib.sh

Or for tvOS (includes iOS, iOS Simulator, tvOS, and tvOS Simulator targets):

./build-go-lib.sh --tvos

You can also pass an explicit version:

./build-go-lib.sh 0.2.0
./build-go-lib.sh --tvos 0.2.0

Open the Xcode project, and we are ready to go.

Updating the netbird submodule

To update to a newer netbird version:

cd netbird-core
git fetch --tags
git checkout v0.x.y   # or any branch/commit
cd ..
git add netbird-core
git commit -m "update netbird submodule to v0.x.y"

Running on iOS Device

Note: The app cannot run in the iOS simulator. To test the app, a physical device needs to be connected to Xcode via cable and set as the run destination.

Running on Apple TV

Note: The app cannot run in the tvOS simulator. To test the app, a physical device running tvOS 17.0 or later needs to be paired with Xcode.

Firebase Configuration (Optional)

The app supports Firebase for analytics and crash reporting. To enable it, add your GoogleService-Info.plist file to the project root. The app will work without Firebase configuration.

Other project repositories

NetBird project is composed of multiple repositories:

Languages
Swift 97%
C 1.8%
Objective-C 0.7%
Shell 0.5%