coreBluetooth official document translation

frame

Core Bluetooth

Communicate with Bluetooth 4.0 low energy devices


Overview

The core Bluetooth framework provides classes necessary for your application to communicate with devices equipped with Bluetooth Low Energy wireless technology.
Do not the core Bluetooth framework classes. Overriding these framework classes is not supported by the framework itself, and will also result in the consequences of not being recognized by the framework.

IMPORTANT
iOS 10.0 or later iOS applications must contain usage description keys in their Info.plist file for the data types it needs to access or will crash. In order to access bluetooth peripheral data specifically, the Info.plist file must contain NSBluetoothPeripheralUsageDescriptionkeys

theme

kind


  • CBATTRequest
    The CBATTRequest class represents CBCentralthe Attribute Protocol (ATT) for requesting reads and writes from a remote central device (represented by an object). CBPeripheralManagerThe remote center uses these ATT requests to read and write characteristic values ​​(represented by objects) of the local peripheral . On the other hand, the local peripheral CBATTRequestresponds appropriately to read and write requests using the object's properties, using CBPeripheralManagerthe class's respond(to:withResult:)methods
  • CBAttribute
    CBAttribute is an abstract base class that defines the behavior of common collection objects that represent various aspects of services provided by peripheral devices.
  • CBCentral
    The CBCentral class represents a remote central device that is connected to an application that implements the peripheral role on the local device. That is, when you use CBPeripheralManagerclasses to implement peripheral roles, hubs connected to your local peripherals are treated as CBCentral objects. Remote centers are identified by Universally Unique Identifiers (UUIDs), represented by NSUUIDobjects.
  • CBCentralManager
    The CBCentralManager object is used to manage discovered or connected remote peripherals (represented by CBPeripheralobjects), including scanning, discovering, and connecting to advertised peripherals.
  • CBCharacteristic
    CBCharacteristic and its subclasses CBMutableCharacteristicprovide more service information for a peripheral. A CBCharacteristic object specifically represents the service characteristics of a remote peripheral (remote peripherals are CBPeripheralrepresented by objects). A feature contains a single value and many descriptors describing that value. The attributes of a feature determine how the feature value is used and how the descriptor is accessed.
  • CBDescriptor
    CBDescriptor and its subclasses CBMutableDescriptorrepresent a characteristic descriptor of a peripheral device. A CBDescriptor object specifically represents a feature descriptor for a remote peripheral (remote peripherals are CBPeripheralrepresented by objects). Descriptors provide more information on feature values. For example, they can describe the value in human-readable form, and describe how to format the value for presentation purposes.
  • CBManager
    Abstract base class for core Bluetooth management objects (central and peripheral).
  • CBMutableCharacteristic
    The CBMutableCharacteristic object represents the service characteristics of the local peripheral (the local peripheral is CBPeripheralManagerrepresented by the object). CBCharacteristicThis class adds write access to many properties on the classes it inherits .
  • CBMutableDescriptor
    A CBMutableDescriptor object represents a feature descriptor for a local peripheral (local peripherals are CBPeripheralManagerrepresented by objects).
  • CBMutableService
    CBMutableServiceCBServiceA class adds write access to all properties of the classes it inherits . CBPeripheralManagerYou use this class to create a service or a service (represented by an object) contained in a local peripheral . After you create a service, you can use CBPeripheralManagerthe class add(_:)methods to add it to the peripheral's local base data. After you add a service to the peripheral's local base data, the service is cached and you can't change it.
  • CBPeer
    CBPeer is an abstract base class that defines common behaviors for objects representing remote devices. You usually do not create an instance of CBPeer or its concrete subclasses.
  • CBPeripheral
    The CBPeripheral class represents your application CBCentralManager's discovery of broadcasted or currently connected remote peripherals through (an instance of) the central manager. Peripherals are identified by NSUUIDobject Universal Universal Identifiers (UUIDs). Peripherals may contain one or more services, or provide useful information about the signal strength to which they are linked.
  • CBPeripheralManager
    The CBPeripheralManager object is used to manage publishing services with the Generic Attribute Profile (GATT) database of the local peripherals, and to broadcast these services to the central device (represented by the CBCentralobject). Although the service is in the database, it is visible and accessible from any connected hub. That is, if your application does not specify a Bluetooth peripheral background mode, the content of the Bluetooth service is unavailable when the application is in background mode or suspended; any remote device attempting to access the service's characteristic values ​​or characteristic descriptors The center will receive an error message.
  • CBService
    CBService and its subclasses CBMutableServicerepresent a peripheral device that implements a function or a device function (part of the device's function) of data collection and related behavior services. CBPeripheralA CBService object specifically represents a service (by object) of a remote peripheral . Services are primary or secondary, and may contain many features or contain services (references to other services).
  • CBUUID
    Instances of the CBUUID class represent 128-bit Universal Uniform Identifiers (UUIDs) attributes used in Bluetooth Low Energy communications, such as peripheral services, characteristics, and characteristic descriptors. When you develop your application, this class provides many factory methods to deal with long UUIDs. For example, you could create a CBUUID object to represent it instead of passing it in your code as a string of 128-bit Bluetooth Low Energy properties.
  • CBL2CAPChannel

protocol


* CBCentralManagerDelegate
CBCentralManagerDelegateProtocols define the CBCentralManagermethods that an object's proxy must take. The optional methods of the protocol allow the agent to monitor the discovery, connection, and discovery of peripheral devices. The only required method in the protocol shows the availability of the central manager and is called when the state of the central manager is updated.
* CBPeripheralDelegate
CBPeripheralThe proxy of the object must adopt the CBPeripheralDelegate protocol. This agent uses the methods of this protocol to monitor the discovery, exploration, and interaction of services and properties of remote peripherals. Son, there is no required method in this protocol.
* CBPeripheralManagerDelegate
CBPeripheralManagerThe proxy of the object must adopt the CBPeripheralManagerDelegateprotocol, which consists of many optional methods and one required method. The optional methods of this protocol are used by proxies to authenticate publications and broadcasts, monitor reads and writes, and subscribe to requests from remote central devices. A required method of this protocol, which shows if the peripheral manager is available, is called when the peripheral manager's legs are updated.

refer to


* Core Bluetooth Constants
this document describes constants found in the core bluetooth framework
**Core Bluetooth Enumerations
Core Bluetooth Data Types

structure

* CBATTErrorStructure
* CBAttributePermissionsStructure
Represents the value of the read and write encryption rights of a feature value
* CBCharacteristicPropertiesstructure
Represents the value of a possible attribute of a feature. Since feature attributes can be combined, a feature may have many sets of attribute values.
* CBErrorstruct


Original link address: https://developer.apple.com/documentation/corebluetooth
The specific classes and protocols will be updated in subsequent versions. The
initial translation has many shortcomings. Welcome to correct me

                                            持续更新中...

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326445513&siteId=291194637