Skip to content

Implement iOS support for connectivity detection #9

@velocitysystems

Description

@velocitysystems

Summary

Implement iOS support for connection_status().
The types, command, permissions, and JS/TS bindings have already been merged in #2.

iOS exposes everything needed through Apple's Network framework (NWPathMonitor, available since iOS 12): reachability via NWPath.status, cost/metered state via NWPath.isExpensive, the Low Data Mode flag via NWPath.isConstrained, and the active interface type via NWPath.usesInterfaceType(_:) (Wi-Fi, wired Ethernet, cellular). Implementation will follow Tauri's mobile plugin pattern with a Swift bridge under ios/Sources/ invoked from Rust via the plugin's mobile entry point.

The existing ConnectionStatus field mappings in src/types.rs already document the iOS counterparts (NWPath.isExpensive, NWPath.isConstrained).

Out of Scope

  • Windows, Linux, macOS, and Android backends — separate follow-ups.
  • Change-notification / observer APIs for status transitions (NWPathMonitor update handler).
  • Data-limit fields (approaching_data_limit, over_data_limit) and roaming flags — not distinctly exposed by Network framework on iOS (only the rolled-up isExpensive / isConstrained signals).
  • Legacy SystemConfiguration/SCNetworkReachability fallback for pre-iOS 12 systems — minimum target is iOS 12+.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions