NetworkCollector

public class NetworkCollector : DeviceCollector, @unchecked Sendable

Collector for device network connectivity information.

This collector determines the current network connectivity status using the modern Network framework available in iOS 13+. It provides a snapshot of connectivity at collection time.

  • Declaration

    Swift

    public typealias DataType = NetworkInfo
  • key

    Unique identifier for network connectivity data

    Declaration

    Swift

    public let key: String
  • collect() Asynchronous

    Collects current network connectivity information

    Declaration

    Swift

    public func collect() async -> NetworkInfo?

    Return Value

    NetworkInfo containing connectivity status

  • Initializes a new instance

    Declaration

    Swift

    public init()