Interface CBPeripheralDelegate


  • public interface CBPeripheralDelegate
    [@protocol] CBPeripheralDelegate Delegate for CBPeripheral.
    • Method Detail

      • peripheralDidDiscoverCharacteristicsForServiceError

        default void peripheralDidDiscoverCharacteristicsForServiceError​(CBPeripheral peripheral,
                                                                         CBService service,
                                                                         NSError error)
        peripheral:didDiscoverCharacteristicsForService:error: This method returns the result of a @link discoverCharacteristics:forService: @/link call. If the characteristic(s) were read successfully, they can be retrieved via service's characteristics property.
        Parameters:
        peripheral - The peripheral providing this information.
        service - The CBService object containing the characteristic(s).
        error - If an error occurred, the cause of the failure.
      • peripheralDidDiscoverDescriptorsForCharacteristicError

        default void peripheralDidDiscoverDescriptorsForCharacteristicError​(CBPeripheral peripheral,
                                                                            CBCharacteristic characteristic,
                                                                            NSError error)
        peripheral:didDiscoverDescriptorsForCharacteristic:error: This method returns the result of a @link discoverDescriptorsForCharacteristic: @/link call. If the descriptors were read successfully, they can be retrieved via characteristic's descriptors property.
        Parameters:
        peripheral - The peripheral providing this information.
        characteristic - A CBCharacteristic object.
        error - If an error occurred, the cause of the failure.
      • peripheralDidDiscoverIncludedServicesForServiceError

        default void peripheralDidDiscoverIncludedServicesForServiceError​(CBPeripheral peripheral,
                                                                          CBService service,
                                                                          NSError error)
        peripheral:didDiscoverIncludedServicesForService:error: This method returns the result of a @link discoverIncludedServices:forService: @/link call. If the included service(s) were read successfully, they can be retrieved via service's includedServices property.
        Parameters:
        peripheral - The peripheral providing this information.
        service - The CBService object containing the included services.
        error - If an error occurred, the cause of the failure.
      • peripheralDidDiscoverServices

        default void peripheralDidDiscoverServices​(CBPeripheral peripheral,
                                                   NSError error)
        peripheral:didDiscoverServices: This method returns the result of a @link discoverServices: @/link call. If the service(s) were read successfully, they can be retrieved via peripheral's @link services @/link property.
        Parameters:
        peripheral - The peripheral providing this information.
        error - If an error occurred, the cause of the failure.
      • peripheralDidModifyServices

        default void peripheralDidModifyServices​(CBPeripheral peripheral,
                                                 NSArray<? extends CBService> invalidatedServices)
        peripheral:didModifyServices: This method is invoked when the @link services @/link of peripheral have been changed. At this point, the designated CBService objects have been invalidated. Services can be re-discovered via @link discoverServices: @/link.
        Parameters:
        peripheral - The peripheral providing this update.
        invalidatedServices - The services that have been invalidated
      • peripheralDidReadRSSIError

        default void peripheralDidReadRSSIError​(CBPeripheral peripheral,
                                                NSNumber RSSI,
                                                NSError error)
        peripheral:didReadRSSI:error: This method returns the result of a @link readRSSI: @/link call.
        Parameters:
        peripheral - The peripheral providing this update.
        RSSI - The current RSSI of the link.
        error - If an error occurred, the cause of the failure.
      • peripheralDidUpdateNotificationStateForCharacteristicError

        default void peripheralDidUpdateNotificationStateForCharacteristicError​(CBPeripheral peripheral,
                                                                                CBCharacteristic characteristic,
                                                                                NSError error)
        peripheral:didUpdateNotificationStateForCharacteristic:error: This method returns the result of a @link setNotifyValue:forCharacteristic: @/link call.
        Parameters:
        peripheral - The peripheral providing this information.
        characteristic - A CBCharacteristic object.
        error - If an error occurred, the cause of the failure.
      • peripheralDidUpdateValueForCharacteristicError

        default void peripheralDidUpdateValueForCharacteristicError​(CBPeripheral peripheral,
                                                                    CBCharacteristic characteristic,
                                                                    NSError error)
        peripheral:didUpdateValueForCharacteristic:error: This method is invoked after a @link readValueForCharacteristic: @/link call, or upon receipt of a notification/indication.
        Parameters:
        peripheral - The peripheral providing this information.
        characteristic - A CBCharacteristic object.
        error - If an error occurred, the cause of the failure.
      • peripheralDidUpdateValueForDescriptorError

        default void peripheralDidUpdateValueForDescriptorError​(CBPeripheral peripheral,
                                                                CBDescriptor descriptor,
                                                                NSError error)
        peripheral:didUpdateValueForDescriptor:error: This method returns the result of a @link readValueForDescriptor: @/link call.
        Parameters:
        peripheral - The peripheral providing this information.
        descriptor - A CBDescriptor object.
        error - If an error occurred, the cause of the failure.
      • peripheralDidWriteValueForCharacteristicError

        default void peripheralDidWriteValueForCharacteristicError​(CBPeripheral peripheral,
                                                                   CBCharacteristic characteristic,
                                                                   NSError error)
        peripheral:didWriteValueForCharacteristic:error: This method returns the result of a {@link writeValue:forCharacteristic:type:} call, when the CBCharacteristicWriteWithResponse type is used.
        Parameters:
        peripheral - The peripheral providing this information.
        characteristic - A CBCharacteristic object.
        error - If an error occurred, the cause of the failure.
      • peripheralDidWriteValueForDescriptorError

        default void peripheralDidWriteValueForDescriptorError​(CBPeripheral peripheral,
                                                               CBDescriptor descriptor,
                                                               NSError error)
        peripheral:didWriteValueForDescriptor:error: This method returns the result of a @link writeValue:forDescriptor: @/link call.
        Parameters:
        peripheral - The peripheral providing this information.
        descriptor - A CBDescriptor object.
        error - If an error occurred, the cause of the failure.
      • peripheralDidUpdateName

        default void peripheralDidUpdateName​(CBPeripheral peripheral)
        peripheralDidUpdateName: This method is invoked when the @link name @/link of peripheral changes.
        Parameters:
        peripheral - The peripheral providing this update.
      • peripheralDidUpdateRSSIError

        @Deprecated
        default void peripheralDidUpdateRSSIError​(CBPeripheral peripheral,
                                                  NSError error)
        Deprecated.
        Use {@link peripheral:didReadRSSI:error:} instead.
        peripheralDidUpdateRSSI:error: This method returns the result of a @link readRSSI: @/link call.
        Parameters:
        peripheral - The peripheral providing this update.
        error - If an error occurred, the cause of the failure.
      • peripheralDidOpenL2CAPChannelError

        default void peripheralDidOpenL2CAPChannelError​(CBPeripheral peripheral,
                                                        CBL2CAPChannel channel,
                                                        NSError error)
        peripheral:didOpenL2CAPChannel:error: This method returns the result of a @link openL2CAPChannel: @link call.
        Parameters:
        peripheral - The peripheral providing this information.
        channel - A CBL2CAPChannel object.
        error - If an error occurred, the cause of the failure.
      • peripheralIsReadyToSendWriteWithoutResponse

        default void peripheralIsReadyToSendWriteWithoutResponse​(CBPeripheral peripheral)
        peripheralIsReadyToSendWriteWithoutResponse: This method is invoked after a failed call to @link writeValue:forCharacteristic:type: @/link, when peripheral is again ready to send characteristic value updates.
        Parameters:
        peripheral - The peripheral providing this update.