Instance Method

addService:

Publishes a service and any of its associated characteristics and characteristic descriptors to the local GATT database.

Declaration

- (void)addService:(CBMutableService *)service;

Parameters

service

The service you want to publish.

Discussion

When you add a service to the database, the peripheral manager calls the peripheralManager:didAddService:error: method of its delegate object. If the service contains any included services, you must first publish them.

See Also

Adding and Removing Services

- removeService:

Removes a specified published service from the local GATT database.

- removeAllServices

Removes all published services from the local GATT database.