Reachability
public class Reachability: QueryConnectivity, TrackerHost
Class used to determine device connectivity status
-
Shared instance of Reachability by default uses the
ReachabilityConfiguration.default
configuration.Declaration
Swift
public static var sharedInstance: QueryConnectivity = Reachability()
-
Returns true if the user has authenticated offline.
Declaration
Swift
public var isOfflineAuthenticated: Bool
-
Initializes a new Reachability object using the provided configuration.
Defaults to using a
ReachabilityConfiguration.default
configuration.Declaration
Swift
public init(configuration: ReachabilityConfiguration = ReachabilityConfiguration.default)
Parameters
configuration
ReachabilityConfiguration to use
-
Declaration
Swift
public func queryConnectivity(_ onComplete: QueryConnectivityCompletion?)
-
Clears the authorization reachability check cache, ensuring the next check of connectivity will call the configured authorization URL to validate authentication state.
If the configuration does not contain an authorization URL, the cache is unused, so clearing it has no effect.
Declaration
Swift
public func clearCache()
-
ReachabilityConfiguration class, allowing for custom Reachability parameters
See moreDeclaration
Swift
public struct ReachabilityConfiguration