Instance Method


Invoked when a peripheral’s services have changed.


optional func peripheral(_ peripheral: CBPeripheral, didModifyServices invalidatedServices: [CBService])



The peripheral providing this information.


A list of services that have been invalidated.


This method is invoked whenever one or more services of a peripheral have changed. A peripheral’s services have changed if:

  • A service is removed from the peripheral’s database

  • A new service is added to the peripheral’s database

  • A service that was previously removed from the peripheral’s database is readded to the database at a different location

If you previously discovered any of the services that have changed, they are provided in the invalidatedServices parameter and can no longer be used. You can use the discoverServices(_:) method to discover any new services that have been added to the peripheral’s database or to find out whether any of the invalidated services that you were using (and want to continue using) have been added back to a different location in the peripheral’s database.

See Also

Monitoring Changes to a Peripheral’s Name or Services

func peripheralDidUpdateName(CBPeripheral)

Invoked when a peripheral’s name changes.

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