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
See moreConnectUI
instance.Declaration
Swift
public protocol AlertUI : ConnectUIElement
-
Objects conforming to this protocol provide a user interface front-end for a
See moreConnectTask
instance. This protocol represents a coordinator that creates, shows, and dismisses various user interface elements.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
See moreConnectUI
instance.Declaration
Swift
public protocol InfoUI : ConnectUIElement
-
User interface to present device search results to the user.
Objects conforming to this protocol are vended by the
See moreConnectUI
instance.Declaration
Swift
public protocol SearchUI : ConnectUIElement
-
Type erased ConnectionTask
See moreDeclaration
Swift
public protocol AnyConnectionTask : 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
See moreDeviceSearchTask
is initialized with an object conforming to theDeviceSearchTaskUserInterface
protocol and calls these functions to show, hide, and update the user interface. The user interface calls back to the device search task via theDeviceSearchTaskUserInterfaceDelegate
protocol.Declaration
Swift
@available(*, deprecated, message: "DeviceSearchTask has been deprecated. It has been replaced by ConnectionTask.") public protocol DeviceSearchTaskUserInterface
-
This protocol allows a
See moreDeviceSearchTaskUserInterface
to call back to the internal device search task indicating that the user selected a device or cancelled the operation.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
See moreSensorDispatch
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.Declaration
Swift
public protocol SensorDispatchHandler : AnyObject
-
Represents a wearable device instance.
See moreDeclaration
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 aWearableDeviceSession
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:- 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. - You can perform a device search (via
BoseWearable.startDeviceSearch(mode:completionHandler:)
orDeviceSearchTask
). Note that you must first release the closedWearableDeviceSession
by setting any retained references tonil
.
Declaration
Swift
public protocol WearableDeviceSession
- You can call
-
A wearable device session delegate gets notified of connection-related events.
See moreDeclaration
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
See moreBoseWearable.startDeviceSearch(mode:completionHandler:)
API.Declaration
Swift
public protocol WearableDeviceSessionPairingDelegate : AnyObject