Contents

isPreferredNetworkAvailable(completion:)

Indicates whether a preferred network is available.

Declaration

func isPreferredNetworkAvailable(completion: @escaping  @Sendable (Bool) -> Void)
func isPreferredAvailable() async -> Bool

Parameters

  • completion:

    The completion handler that returns the result of the preferred network status.

Mentioned in

Discussion

Call the method as follows:

func obtainPreferredAvailable() async -> (NSString?) {
    let client = THClient()
    var bIsPreferredAvailable:Bool?
    bIsPreferredAvailable = await client.isPreferredAvailable()
    let str = ((bIsPreferredAvailable == true) ? "true" : "false")
    return str as NSString;
}

See Also

Retrieving Credentials