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 -
Unique identifier for network connectivity data
Declaration
Swift
public let key: String -
collect()AsynchronousCollects 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()
View on GitHub