AdvertisementData

public struct AdvertisementData

This struct allows us to apply some data interpretation to the advertisement data.

  • This holds the raw advertisement data that came with the discovery.

    Declaration

    Swift

    public let advertisementData: [String : Any]
  • Returns the local name, if provided. If not provided, will return an empty String.

    Declaration

    Swift

    public var localName: String { get }
  • Returns true or false. True, if the Peripheral is connectable.

    Declaration

    Swift

    public var isConnectable: Bool { get }
  • Returns the transmit power level. Nil, if not provided.

    Declaration

    Swift

    public var transmitPowerLevel: Int? { get }
  • Returns the timestamp, as a date. Nil, if not provided.

    Declaration

    Swift

    public var timestamp: Date? { get }
  • Returns true, if the Peripheral has a primary PHY.

    Declaration

    Swift

    public var hasPrimaryPHY: Bool { get }
  • Returns true, if the Peripheral has a secondary PHY.

    Declaration

    Swift

    public var hasSecondaryPHY: Bool { get }
  • Returns any manufacturer-specific data. Nil, if not provided.

    Declaration

    Swift

    public var manufacturerData: Data? { get }
  • Returns a list of UUID Strings, describing any advertised Services.

    Declaration

    Swift

    public var advertisedServiceUUIDS: [String]? { get }