Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

CBPeripheralManagerMBS class

Super class: CBManagerMBS

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Bluetooth MBS Bluetooth Plugin 18.1 Yes No No Yes, macOS only No
Function: The CoreBluetooth peripheral manager class.
Notes:
CBPeripheralManager objects are used to manage published services within the local peripheral device’s Generic Attribute Profile (GATT) database and to advertise these services to central devices (represented by CBCentral objects). While a service is in the database, it is visible to, and can be accessed by, any connected central. That said, if your app has not specified the bluetooth-peripheral background mode, the contents of its services become disabled when it is in the background or in a suspended state; any remote central trying to access the service’s characteristic value or characteristic descriptors receives an error.

Before you call CBPeripheralManager methods, the state of the peripheral manager object must be powered on, as indicated by the kStatePoweredOn. This state indicates that the peripheral device (your iPhone or iPad, for instance) supports Bluetooth low energy and that its Bluetooth is on and available to use.
Subclass of the CBManagerMBS class.

Feedback, Comments & Corrections

Authorization States

Constant Value Description
kAuthorizationStatusAuthorized 3 This app is authorized to share data using Bluetooth services while in the background state.
kAuthorizationStatusDenied 2 The user explicitly denied this app from sharing data using Bluetooth services while in the background state.
kAuthorizationStatusNotDetermined 0 The user has not yet made a choice regarding whether this app can share data using Bluetooth services while in the background state.
kAuthorizationStatusRestricted 1 This app is not authorized to share data using Bluetooth services while in the background state. The user cannot change this app’s status, possibly due to active restrictions such as parental controls being in place.

Latencies

Constant Value Description
kConnectionLatencyHigh 2 Extending battery life has priority over rapid communication.
kConnectionLatencyLow 0 Rapid communication has priority over battery life.
kConnectionLatencyMedium 1 A balance exits between communication frequency and battery life.

States

Constant Value Description
kStatePoweredOff 4 Bluetooth is currently powered off.
kStatePoweredOn 5 Bluetooth is currently powered on and is available to use.
kStateResetting 1 The connection with the system service was momentarily lost; an update is imminent.
kStateUnauthorized 3 The app is not authorized to use the Bluetooth low energy peripheral/server role.
kStateUnknown 0 The current state of the peripheral manager is unknown; an update is imminent.
kStateUnsupported 2 The platform doesn't support the Bluetooth low energy peripheral/server role.

Super class CBManagerMBS

States

Constant Value Description
kStatePoweredOff 4 Bluetooth is currently powered off.
kStatePoweredOn 5 Bluetooth is currently powered on and available to use.
kStateResetting 1 The connection with the system service was momentarily lost, update imminent.
kStateUnauthorized 3 The application is not authorized to use the Bluetooth Low Energy role.
kStateUnknown 0 State unknown, update imminent.
kStateUnsupported 2 The platform doesn't support the Bluetooth Low Energy Central/Client role.

This class has no sub classes.


The items on this page are in the following plugins: MBS Bluetooth Plugin.


CBPeerMBS   -   CBPeripheralMBS





Links
MBS FileMaker Plugins