Protocols

The following protocols are available globally.

  • User interface to present an alert to the user.

    Objects conforming to this protocol are vended by the ConnectUI instance.

    See more

    Declaration

    Swift

    public protocol AlertUI : ConnectUIElement
  • Objects conforming to this protocol provide a user interface front-end for a ConnectTask instance. This protocol represents a coordinator that creates, shows, and dismisses various user interface elements.

    See more

    Declaration

    Swift

    public protocol ConnectUI
  • Super-type of the various connect UI elements.

    Declaration

    Swift

    public protocol ConnectUIElement
  • User interface to present information to the user.

    Objects conforming to this protocol are vended by the ConnectUI instance.

    See more

    Declaration

    Swift

    public protocol InfoUI : ConnectUIElement
  • Allows the InfoUI instance to notify when user interface events have occurred.

    See more

    Declaration

    Swift

    public protocol InfoUIDelegate : AnyObject
  • User interface to present device search results to the user.

    Objects conforming to this protocol are vended by the ConnectUI instance.

    See more

    Declaration

    Swift

    public protocol SearchUI : ConnectUIElement
  • Allows the SearchUI instance to notify when user interface events have occurred.

    See more

    Declaration

    Swift

    public protocol SearchUIDelegate : AnyObject
  • Objects conforming to this protocol provide a user interface to show devices as they are discovered and allow the user to select a device.

    A DeviceSearchTask is initialized with an object conforming to the DeviceSearchTaskUserInterface protocol and calls these functions to show, hide, and update the user interface. The user interface calls back to the device search task via the DeviceSearchTaskUserInterfaceDelegate protocol.

    See more

    Declaration

    Swift

    @available(*, deprecated, message: "DeviceSearchTask has been deprecated. It has been replaced by ConnectionTask.")
    public protocol DeviceSearchTaskUserInterface
  • This protocol allows a DeviceSearchTaskUserInterface to call back to the internal device search task indicating that the user selected a device or cancelled the operation.

    See more

    Declaration

    Swift

    @available(*, deprecated, message: "DeviceSearchTask has been deprecated. It has been replaced by ConnectionTask.")
    public protocol DeviceSearchTaskUserInterfaceDelegate : AnyObject
  • This protocol defines functions that are called by a SensorDispatch to notify a client application that sensor data has been received. Note that default implementations of each of these functions are already provided. Thus, you need only implement the functions corresponding to the sensors you are interested in.

    See more

    Declaration

    Swift

    public protocol SensorDispatchHandler : AnyObject
  • Represents a wearable device instance.

    See more

    Declaration

    Swift

    public protocol WearableDevice
  • Represents a connection with a wearable device. A WearableDeviceSession must be retained for as long as you are interested in the connection. Once a WearableDeviceSession is deallocated, the connection is automatically closed and disposed.

    In the event that a session has closed, you will be notified via the WearableDeviceSessionDelegate.session(_:didCloseWithError:) delegate function. To re-establish communication with the remote device, you can do one of two things:

    1. You can call WearableDeviceSession.open() to open the connection again. Note that if the session was closed due to the remote device being powered down or moved out of range, it must be powered back on or moved back into range in order for this to succeed.
    2. You can perform a device search (via BoseWearable.startDeviceSearch(mode:completionHandler:) or DeviceSearchTask). Note that you must first release the closed WearableDeviceSession by setting any retained references to nil.
    See more

    Declaration

    Swift

    public protocol WearableDeviceSession
  • A wearable device session delegate gets notified of connection-related events.

    See more

    Declaration

    Swift

    public protocol WearableDeviceSessionDelegate : AnyObject
  • The pairing delegate gets notified when a device is required to be put into pairing mode in order to proceed with the connection. This is only required if you are implementing a custom connection UI or if you are using the deprecated BoseWearable.startDeviceSearch(mode:completionHandler:) API.

    See more

    Declaration

    Swift

    public protocol WearableDeviceSessionPairingDelegate : AnyObject