add(_:)
Publishes a service and any of its associated characteristics and characteristic descriptors to the local GATT database.
Declaration
func add(_ service: CBMutableService)Parameters
- service:
The service you want to publish.
Discussion
When you add a service to the database, the peripheral manager calls the peripheralManager(_:didAdd:error:) method of its delegate object. If the service contains any included services, you must first publish them.