Swift Rest SDK Documentation Beta

Class Mobiledge​XiOSLibrary.​Network​Interface

public class NetworkInterface

Contains functions related to network interfaces (cellular, wifi)

Member Of

MobiledgeXiOSLibrary

Swift MobiledgeX SDK namespace Used for "namespacing" purposes to prevent naming conflicts from common names (Util, NetworkInterface, etc.)

Properties

CELLULAR

let CELLULAR = "pdp_ip0"

WIFI

let WIFI = "en0"

Methods

has​Wifi​Interface()

public static func hasWifiInterface() -> Bool

Returns true if device has wifi interface (ie. on wifi network)

has​Cellular​Interface()

public static func hasCellularInterface() -> Bool

Returns true if device has cellular interface

has​Wifi()

public static func hasWifi() -> Bool

Returns true if an ip address is assigned to the wifi interface

has​Cellular()

public static func hasCellular() -> Bool

Returns true if an ip address is assigned to the cellular interface

is​Roaming()

public static func isRoaming() throws -> Bool

Compares the ISO Country code of the user's location with the ISO Country of the user's carrier. Roaming if not equal

get​IPAddress(net​Interface​Type:​)

public static func getIPAddress(netInterfaceType: String?) -> String?

Gets the client IP Address on the interface specified