SecurityModeSetting

public protocol SecurityModeSetting : AnyObject

Setting providing access to the Wifi access point security setup.

  • Tells if the setting value has been changed and is waiting for change confirmation.

    Declaration

    Swift

    var updating: Bool { get }
  • Supported security modes.

    Declaration

    Swift

    var supportedModes: Set<SecurityMode> { get }
  • Currently active security modes.

    Declaration

    Swift

    var modes: Set<SecurityMode> { get }
  • Current security mode.

    Declaration

    Swift

    @available(*, deprecated, message: "Use `modes` instead")
    var mode: SecurityMode { get }
  • Sets the security mode to .open, disabling any security checks.

    Note

    this function does nothing if the .open mode is not supported (see supportedModes).

    Declaration

    Swift

    func open()
  • Sets the security mode to .wpa2Secured, and secures connection to the access point using a password.

    Password validation is checked first (see WifiPasswordUtil.isValid(_:)), and nothing is done if password is not valid.

    Note

    this function does nothing if the .wpa2Secured mode is not supported (see supportedModes).

    Declaration

    Swift

    @available(*, deprecated, message: "Use `secure(with:password:﹚` instead")
    func secureWithWpa2(password: String) -> Bool

    Parameters

    password

    password to secure the access point with

    Return Value

    true if the new configuration has been sent, false otherwise

  • Configures secure connection with the given modes and password.

    Password validation is checked first (see WifiPasswordUtil.isValid(_:)), and nothing is done if password is not valid.

    Modes that are not supported (see supportedModes), as well as .open mode, will be ignored when passed in the modes argument.

    Declaration

    Swift

    func secure(with modes: Set<SecurityMode>, password: String) -> Bool

    Parameters

    modes

    security modes to activate

    password

    access point password

    Return Value

    true if the new configuration has been sent, false otherwise