BWPeripheralManager Class Reference
Inherits from | CBPeripheralManager |
Declared in | BWPeripheralManager.h |
Instance Methods
addService:
Publishes a service and any of its associated characteristics and characteristic descriptors to the local GATT database.
- (void)addService:(CBMutableService *)service
Parameters
- service
The service you want to publish.
Declared In
BWPeripheralManager.h
removeAllServices
Removes all published services from the local GATT database.
- (void)removeAllServices
Declared In
BWPeripheralManager.h
removeService:
Removes a specified published service from the local GATT database.
- (void)removeService:(CBMutableService *)service
Parameters
- service
The service you want to remove.
Declared In
BWPeripheralManager.h
startAdvertising:
Advertises peripheral manager data.
- (void)startAdvertising:(NSDictionary *)advertisementData
Parameters
- advertisementData
An optional dictionary containing the data you want to advertise.
Declared In
BWPeripheralManager.h
stopAdvertising
Stops advertising peripheral manager data.
- (void)stopAdvertising
Declared In
BWPeripheralManager.h
updateValue:forCharacteristic:onSubscribedCentrals:
Sends an updated characteristic value to one or more subscribed centrals, via a notification or indication.
- (BOOL)updateValue:(NSData *)value forCharacteristic:(CBMutableCharacteristic *)characteristic onSubscribedCentrals:(NSArray *)centrals
Parameters
- value
The characteristic value you want to send via a notification or indication.
- characteristic
The characteristic whose value has changed.
- centrals
A list of centrals (represented by CBCentral objects) that have subscribed to receive updates of the characteristic’s value.
Return Value
YES if the update is successfully sent to the subscribed central or centrals. NO if the update is not successfully sent because the underlying transmit queue is full.
Declared In
BWPeripheralManager.h