55 Commits

Author SHA1 Message Date
evgeniyChepelev f5ecd96d3d Test commit 2026-05-04 11:04:46 +02:00
DevBot NetBird c76475be3a Bump netbird-core submodule to v0.70.4 (#111)
Co-authored-by: netbirddev <dev@netbird.io>
v0.2.0
2026-04-30 11:13:17 +02:00
Zoltan Papp 95b5dc4b66 ci: add workflow to bump netbird-core submodule on release tags (#110) 2026-04-29 17:10:33 +02:00
evgeniyChepelev 8bf2de390e fix(iOS): align VPN button to arch background via overlay (#107)
Move the Lottie button into an overlay on the background image so
both share the same coordinate space, matching Android's approach
of placing btn_connect as a sibling of bg_mask inside bg_mask_container.
2026-04-28 15:28:19 +02:00
evgeniyChepelev 5cf7fedc27 Update testflight.yml (#108) 2026-04-28 14:23:25 +02:00
evgeniyChepelev ab2a0d8e1e Auto build number from App Store Connect (#104) 2026-04-24 08:26:51 +02:00
Viktor Liu 8b053eae30 Add IPv6 blackhole route when IPv4 default is in tunnel (#99)
Co-authored-by: Zoltán Papp <zoltan.pmail@gmail.com>
2026-04-23 16:26:55 +02:00
Zoltan Papp f82e68708f ci: fix TypeError in issue_comment gate — pr was already unwrapped (#102)
The response from github.rest.pulls.get is destructured as
`const { data: pr } = ...` on line 102, so `pr` is already the PR
object. Lines 110, 111, and 115 then did `pr.data.head.*` — double
dereference — which crashed with 'Cannot read properties of undefined
(reading head)' the first time anyone commented /testflight after
PR #97 landed the issue_comment handler.
2026-04-22 14:31:07 +02:00
evgeniyChepelev 0327624b30 Multi-profiles (#80)
* fix layout on ipad

* Create multi profiles

* multi-profile server config, connection cache, and auth fixes

 Split ProfilesView into ProfilesListView, AddProfileSheet, ProfileBadge, AddProfileViewModel
- Add server URL + setup key fields to Add Profile screen
- Store per-profile connection data (ip/fqdn/managementURL) as typed model in ProfileConnectionCache
- Show cached connection info immediately on profile switch; empty if no prior data
- Fix profile deletion persistence via tombstone in profiles.json
- Fix logout to remove both netbird.cfg and state.json (cfg holds auth tokens)
- Preserve managementURL in UI after logout via cache fallback
- Guard polling from overwriting new profile's data during disconnect/reconnect cycle

* fix(multi-profile): reinitialize VPN adapter on profile switch and show current server URL

* Update project.pbxproj

* fix(multi-profile): prevent default server overwrite on logout/re-login

* Update PacketTunnelProvider.swift

* fix(multi-profile): address code review findings

- Normalize only scheme and host to lowercase when saving management
  server URL; previously the full URL was lowercased which could corrupt
  case-sensitive paths on self-hosted servers
- Move switchConnectionInfo(to:) inside the do-block so the connection
  UI is only updated after a successful profile switch
- Add ProfileConnectionCache.remove(for:) and clearConnectionData(for:)
  to prevent stale ip/fqdn/managementURL from persisting after a profile
  is deleted or logged out; call them from removeProfile and logoutProfile
- Use ASWebAuthenticationSession.Callback.customScheme on iOS 17.4+,
  falling back to the deprecated callbackURLScheme initializer on older
  versions; add a comment explaining why "http" is used and that a
  proper fix requires custom-scheme support in the SDK
- Guard presentationAnchor against a missing key window with
  assertionFailure in debug builds instead of silently returning an
  empty UIWindow
2026-04-22 10:06:51 +02:00
Zoltan Papp 658c26c553 ci: remove /testflight example from PR template (#101)
The example testflight lines were inside an HTML comment intended to
be hidden, but the gate's command parser (testflight.yml) scans by
line prefix without stripping HTML comments, so the template's
`testflight version=0.1.5 build-number=3` leaked through as a real
override on every PR, forcing builds to 0.1.5 (3) regardless of tags.
2026-04-21 14:16:48 +02:00
evgeniyChepelev 52f9e4e371 Fix on demand & auth pop-up (#85)
Fixes an issue with On-Demand (Always On) VPN where users could not re-authenticate after session (peer) expiration.
2026-04-21 13:22:14 +02:00
evgeniyChepelev 419e672ae3 ci: add widget build, tvOS TestFlight, and issue_comment trigger (#97)
* ci: add widget build, tvOS TestFlight, and issue_comment trigger

* Update build.yml

* Update testflight.yml

* Update build.yml

* Update testflight.yml
2026-04-20 16:53:26 +02:00
Maycon Santos 2f29085fe7 Update project submodule (#98)
* Update project settings and marketing version to 0.1.5

Reorganized build phases, frameworks, and targets in the Xcode project file. Restored and adjusted configurations for NetBirdTests and other related components. Incremented the marketing version across targets for consistency.

* Remove Package.resolved from project workspace configuration

* Add `Package.resolved` to workspace configuration to track dependencies
v0.1.5
2026-04-16 16:45:38 +02:00
evgeniyChepelev d3ed3b8125 Improve CI/CD (#93)
Fix CI after widget feature merge
2026-04-16 14:28:53 +02:00
Zoltan Papp 7287988856 Derive marketing version from git tags instead of Xcode project (#89)
* Derive marketing version from git tags instead of Xcode project

On main pushes, compute the version by finding the latest v* tag and
bumping the patch component (e.g. v0.1.4 → 0.1.5). This eliminates
manual "bump version" commits and aligns with how android-client
manages versions.

Also remove tag trigger from testflight.yml since release.yml already
handles v* tag pushes, avoiding duplicate builds.

* Validate semver tags and derive version for PR builds too

- Add strict semver regex validation on the tag from git describe
- Use shell parameter expansion instead of cut for parsing
- Run checkout and version derivation for PR events too, so
  /testflight without explicit version= gets a tag-derived version

* Fix false TestFlight upload triggered by /testflight in HTML comments

Strip HTML comments from PR body before checking for /testflight
directive. The PR template contained /testflight examples inside
a comment block, which was incorrectly matching. Also fall back
to tag-derived version for PRs without explicit version= parameter.

* Fix build number to use unique workflow run number

The build number was falling back to the reusable workflow's own
GITHUB_RUN_NUMBER (always 3), causing duplicate builds across PRs.
Now the gate job always sets build-number from the caller's
github.run_number, which is unique per workflow trigger.

* Trigger CI

* Fail build on invalid or missing version tags instead of silent fallback

Falling back to 0.0.1 would silently upload a build with a wrong
version. Better to fail loudly so the bad tag gets noticed.

* Fix Go library version to use netbird submodule tags instead of iOS client version

The build was passing the iOS client version (e.g. 0.1.5) to build-go-lib.sh,
which injected it into the Go library via ldflags. This caused the Dashboard to
report the iOS app version instead of the actual netbird core version. Now
build-go-lib.sh auto-detects the version from netbird-core submodule tags,
matching how android-client handles it.
2026-04-15 16:47:59 +02:00
Zoltan Papp 75215ef3f7 Fix tvOS build using correct target names (#90)
The tvOS build job was using -scheme NetBird which only supports iOS.
Use -target "NetBird TV" and -target "NetBirdTVNetworkExtension" to
match the actual tvOS targets in the Xcode project.

Broken since #69 (2026-03-17).
2026-04-14 21:17:16 +02:00
evgeniyChepelev 315283822c iOS home screen widget (#78)
* Add Home Screen widget with VPN toggle and refactor app activation logic

- Add NetBirdWidgetExtension target with small/medium widget sizes
- Support direct connect/disconnect from widget via interactive buttons (iOS 17+)
- Detect missing VPN config or login-required state and open app via deep link
- Poll for stable VPN state after toggle to prevent loader getting stuck
- Add widget shared state keys to GlobalConstants and sync status from MainViewModel
- Fix false "authentication required" alert on app resume after widget disconnect
- Deduplicate app activation logic into shared startActivation/stopActivation
- Extract polling helpers: updateDetailsIfChanged, updatePeersIfChanged, applyExtensionStatus
2026-04-14 10:30:08 +02:00
Zoltan Papp fde8d8fa8c Harmonize CI with Android: netbird submodule, merged build script (#87)
* Harmonize CI with Android: netbird submodule, merged build script

- Add netbird as git submodule at netbird-core/
- Merge build-go-lib.sh and build-go-lib-tv.sh into single script with --tvos flag
- Smart version resolution: git tag → ci-<hash>/dev-<hash> (matching Android pattern)
- Read Go version from netbird-core/go.mod instead of hardcoding
- Use submodule recursive checkout in all workflows
- Fix release.yml: use pinned submodule instead of assuming matching netbird tag
- Support netbird-ref override in build-upload.yml for TestFlight PR builds
- Update README with submodule setup instructions
2026-04-13 21:28:44 +02:00
Maycon Santos dd44b168fa Fix DNS resolution failure when toggling exit nodes (#82)
- Route all DNS through the tunnel on iOS by always setting matchDomains=[""], eliminating the drift between Go's DNS server (which has a root zone fallback handler) and iOS 
  tunnel settings that only matched specific domains
  - Handle empty route notifications from Go — when the exit node was the only route and was deselected, the notifier sent an empty string that Swift silently dropped, leaving 
  stale 0.0.0.0/0 in the tunnel and black-holing all traffic                                                                                                                    
  - Fix route card status indicator showing green after deselecting a route by checking route.selected before evaluating peer connection status
v0.1.4
2026-04-08 08:44:18 +02:00
Maycon Santos b827f40477 bump marketing version to 0.1.4 (#81)
* bump marketing version to 0.1.4

* add optional netbird-ref input to build-upload workflow

* add concurrency control and support for parsing optional parameters in testflight workflow

* add logging for parsing optional parameters in testflight workflow
2026-04-06 13:11:39 +02:00
evgeniyChepelev b8eca1d347 fix layout on ipad (#75) 2026-03-23 18:09:54 +01:00
evgeniyChepelev 905e0d8dc2 Tv os changes (#72)
* fix ui state for airplaine mode

* fix slide bar

* Keep VPN tunnel alive during network unavailability

- Add isNetworkUnavailable flag to NetBirdAdapter to track network state
- Modify ConnectionListener to stay in 'connecting' state when network
  is unavailable instead of transitioning to 'disconnected'
- Update PacketTunnelProvider to set network unavailable flag and
  trigger automatic reconnect when network returns
- Fix CustomLottieView to show grey 'Disconnected' state immediately
  when network is lost, without closing the VPN tunnel
- Ensure UI shows correct state after app foreground/background cycle

This allows the VPN tunnel to survive temporary network outages
(e.g. airplane mode) and automatically reconnect when network returns.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix UI state after app foreground/background cycle

Show correct connected/disconnected state immediately when app returns
from background, without replaying animations. Use extensionStatus
(iOS VPN state) as the source of truth for UI state.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* netbird credential

* Update MainView.swift

* Separate button by state

* Add gogoleServiceInfo plist reference

* Remove dead code in animation state machine and fix copy-to-clipboard UX  - Remove unreachable shouldForceReset block in CustomLottieView (already handled by earlier return) - Guard against copying empty fqdn/ip strings when disconnected - Use consistent .smooth animation for both fqdn and ip copy feedback

- Remove unreachable shouldForceReset block in CustomLottieView (already handled by earlier return)
- Guard against copying empty fqdn/ip strings when disconnected
- Use consistent .smooth animation for both fqdn and ip copy feedback

* Tab bar

* Update peer view

* Update fonts

* Redesign tvOS connection screen and add peer search

- Move logo to top-left brand anchor (smaller, semi-transparent)
- Restyle connect button with gradient fill, glow shadow, and
  press-down scale animation (TVConnectButtonStyle)
- Add search bar with clear button to peers list view

* Redesign tvOS UI with gradient backgrounds

* Update logo position

* Redesign tvOS peers & resources lists to match settings UI style

* Add color-coded connection status indicator and debug state overlay

* Stabilize connection screen layout and remove debug overlay

* Update project.pbxproj

* Delete mock data

* Update info plist

* Update project.pbxproj

* add go get

* fix Self-hosted management URL

* Fix infinite connecting state after canceling QR code auth on tvOS

* Code refactoring

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: mlsmaycon <mlsmaycon@gmail.com>
2026-03-22 11:52:24 +01:00
evgeniyChepelev 4c95a6582a Implement VPN On Demand with Wi-Fi & cellular policies (#70)
* fix ui state for airplaine mode

* fix slide bar

* Keep VPN tunnel alive during network unavailability

- Add isNetworkUnavailable flag to NetBirdAdapter to track network state
- Modify ConnectionListener to stay in 'connecting' state when network
  is unavailable instead of transitioning to 'disconnected'
- Update PacketTunnelProvider to set network unavailable flag and
  trigger automatic reconnect when network returns
- Fix CustomLottieView to show grey 'Disconnected' state immediately
  when network is lost, without closing the VPN tunnel
- Ensure UI shows correct state after app foreground/background cycle

This allows the VPN tunnel to survive temporary network outages
(e.g. airplane mode) and automatically reconnect when network returns.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix UI state after app foreground/background cycle

Show correct connected/disconnected state immediately when app returns
from background, without replaying animations. Use extensionStatus
(iOS VPN state) as the source of truth for UI state.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* netbird credential

* Update MainView.swift

* Separate button by state

* Add gogoleServiceInfo plist reference

* Remove dead code in animation state machine and fix copy-to-clipboard UX  - Remove unreachable shouldForceReset block in CustomLottieView (already handled by earlier return) - Guard against copying empty fqdn/ip strings when disconnected - Use consistent .smooth animation for both fqdn and ip copy feedback

- Remove unreachable shouldForceReset block in CustomLottieView (already handled by earlier return)
- Guard against copying empty fqdn/ip strings when disconnected
- Use consistent .smooth animation for both fqdn and ip copy feedback

* Tab bar

* Update peer view

* Add offline state handling and network warning banner

- Show "Offline" instead of "Connected" when VPN tunnel is active but device has no internet
- Add NetworkWarningBanner with "Network Issues" warning when connected without internet
- Remove InternetStatusView (online/offline indicator) from connection screen
- Add FirstLaunchView onboarding screen
- Remove unused components (CustomBackButton, Extensions, JustifiedText, SolidButton, TransparentGradientButton)
- Update AboutView, AdvancedView, ServerView, PeerTabView, RouteTabView, iOSNetworksView styling
- Add EmptyTabPlaceholder component

* Add AppButton component with liquid glass support for iOS 26+

* Update FirstLaunchView.swift

* old version

* Update project.pbxproj

* Code refactoring

* Update project.pbxproj

* VPN On Demand

* Update MainViewModel.swift

* Add granular VPN On Demand settings with per-interface rules and conflict detection

* Update project.pbxproj

* code refactoring

* Add Wi-Fi network management for VPN On Demand settings

* Fix ai comments

Prevent On Demand enable when user is not logged in
Add login status check in setOnDemandEnabled() to prevent reconnect
loops when VPN On Demand is enabled without an active session.

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-20 15:20:30 +01:00
evgeniyChepelev f989c5dba0 Add netbird version logging and pass version to Go build (#73)
* Add netbird version logging and pass version to Go build

Log netbird ref, commit SHA, and version during CI build.

* Fix ci/cd

* Update build-upload.yml

* Update build-upload.yml

* Update build-upload.yml

* Add netbird version resolution and logging to CI build

* delete netbird-ref
2026-03-19 09:16:22 +01:00
evgeniyChepelev f4767c7bde Ci/cd scripts (#69)
* **New Features**
  * Added tvOS build support to CI/CD pipeline.
  * Introduced automated App Store Connect publishing and TestFlight deployment workflows with build validation and notifications.

* **Chores**
  * Streamlined build and release workflows.
  * Updated app version to 0.1.3.
  * Added encryption compliance declarations.
2026-03-17 08:59:52 +01:00