Instance Method


Invoked when you publish a service, and any of its associated characteristics and characteristic descriptors, to the local Generic Attribute Profile (GATT) database.


- (void)peripheralManager:(CBPeripheralManager *)peripheral didAddService:(CBService *)service error:(NSError *)error;



The peripheral manager providing this information.


The service that was added to the local GATT database.


If an error occurred, the cause of the failure.


This method is invoked when your app calls the addService: method to publish a service to the local peripheral’s GATT database. If the service is successfully published to the local database, the error parameter is nil. If unsuccessful, the error parameter returns the cause of the failure.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software