Sets notifications or indications for the value of a specified characteristic.
- iOS 5.0+
- macOS 10.7+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 4.0+
- Core Bluetooth
A Boolean value that indicates whether to receive notifications or indications whenever the characteristic’s value changes.
trueif you want to enable notifications or indications for the characteristic’s value.
falseif you don’t want to receive notifications or indications whenever the characteristic’s value changes.
The specified characteristic.
When you enable notifications for the characteristic’s value, the peripheral calls the
peripheral(_: method of its delegate object to indicate if the action succeeded. If successful, the peripheral then calls the
peripheral(_: method of its delegate object whenever the characteristic value changes. Because the peripheral chooses when it sends an update, your app should prepare to handle them as long as notifications or indications remain enabled. If the specified characteristic’s configuration allows both notifications and indications, calling this method enables notifications only. You can disable notifications and indications for a characteristic’s value by calling this method with the
enabled parameter set to