The CBPeer class is an abstract base class that defines common behavior for objects representing remote devices. You typically do not create instances of either CBPeer or its concrete subclasses. Instead, the system creates them for you during the process of peer discovery.


class CBPeer : NSObject


Your app running on the local device takes the role of either a central (by creating an instance of CBCentralManager) or a peripheral (by creating an instance of CBPeripheralManager), and interacts through the manager with remote devices in the opposite role. During the process of peer discovery, where a central device scans for peripherals advertising services, the system creates objects from the concrete subclasses of CBPeer to represent discovered remote devices. The concrete subclasses of CBPeer are:


Identifying a Peer

var identifier: UUID

The UUID associated with the peer.


Inherits From

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