Contents

peripheralManagerDidStartAdvertising(_:error:)

Tells the delegate the peripheral manager started advertising the local peripheral device’s data.

Declaration

optional func peripheralManagerDidStartAdvertising(_ peripheral: CBPeripheralManager, error: (any Error)?)

Parameters

  • peripheral:

    The peripheral manager that is starting advertising.

  • error:

    The reason the call failed, or nil if no error occurred.

Discussion

Core Bluetooth calls this method when your app calls the startAdvertising(_:) method to advertise the local peripheral device’s data. If successful, the error parameter is nil. If a problem prevents advertising the data, the error parameter returns the cause of the failure.