Build extensions that discover nearby media devices, such as speakers, TVs, and laptops, over the network so your app can connect to them. Adopt the DDDiscoveryExtension protocol and configure it with DDDiscoveryExtensionConfigurationProtocol to run a DDDiscoverySession that reports devices it finds. Each discovered device is represented by a DDDevice, which carries information including its DDDeviceState, the protocols it speaks through DDDeviceProtocolString, and the features it advertises through DDDeviceSupports. Respond to changes with DDDeviceEvent and handle failures using DDError.
Building a Discovery Extension 2
Adopt these protocols to create an extension that discovers nearby devices for your app.
- PrDDDiscoveryExtensioniOS 16.0+Protocol for the discovery extension's body property to conform to.
- PrDDDiscoveryExtensionConfigurationProtocoliOS 16.0+Protocol for the discovery extension's body property to conform to.
Running a Discovery Session 2
Manage the session that searches the network and reports the devices it finds.
- ClDDDiscoverySessionManages a session between the extension and host.
- ClDDDeviceEventiOS 16.0+Device-related event (e.g. found, lost).
Discovered Devices 4
Inspect the devices found on the network and the capabilities they advertise.
- ClDDDeviceiOS 16.0+DeviceDiscoveryExtension device.
- EnDDDeviceStateState of the device.
- StDDDeviceProtocolString@defgroup Supported Protocols
- StDDDeviceSupports@brief Device Support
Handling Errors 1
Respond to failures that occur during device discovery.
- StDDErroriOS 16.0+A structure that describes errors that occur during device discovery.
Type Aliases 3
- TyDDErrorOutTypeType for returning NSError's from functions. Avoids long and repetitious method signatures.
- TyDDErrorHandlerInvoked when a fail-able operation completes or an error occurs.
- TyDDEventHandlerInvoked when an event occurs.