-
Notifications
You must be signed in to change notification settings - Fork 0
Core Tws Overview
Mr.P edited this page Aug 29, 2026
·
2 revisions
The TWS API reports whether a device is a True Wireless Stereo device and whether its TWS connection is currently active.
Browse the generated Wiki navigation for the pages in this section.
-
Obtain a Device - Use a connected or discovered
DeviceConvertibleinstance. -
Check Protocol Conformance - Verify support for
DeviceTWSAPI. -
Read Device Type - Use
isTws. -
Read Connection State - Use
isTwsConnectedand observe connection changes when needed.
-
isTwsidentifies whether the device is a TWS device. -
isTwsConnectedreports the current TWS connection snapshot. - A TWS device can currently be disconnected, so the two Boolean values are not interchangeable.
TWS information is exposed by DeviceTWSAPI:
guard let device = device as? DeviceTWSAPI else {
print("Device does not expose TWS information")
return
}id<AIBudsDeviceTWSAPI> device = (id<AIBudsDeviceTWSAPI>)self.device;
if (![device conformsToProtocol:@protocol(AIBudsDeviceTWSAPI)]) {
NSLog(@"Device does not expose TWS information");
return;
}- Check Protocol Conformance: There is no asynchronous TWS support query.
- Keep Values Separate: Do not treat a disconnected TWS device as a non-TWS device.
-
Observe Connection Changes: Implement
didTwsConnectionStatusChangedfor live UI.
- The public protocol does not initiate TWS pairing, connection, or disconnection.
- The SDK does not define stereo routing or channel behavior through this API.
AIBuds SDK documentation · Full documentation · API Reference
- Introduction
- Getting Started
- Core Concepts
-
Core Features
- Basic Features
- Device Info
- Find Device
- Physical Operations
- Work Mode
- Work Status
- Wear Detection
- Volume Control
- Music Control
- TWS
- Equalizer
- ANC
- Audio
- Camera
- Remote Camera
- File Import
- Teleprompter
- Segment Navigation
- Live Streaming
- Device Applications
- OTA
- Camera OTA
- Service Auth
- AI Services
- Voice Assistant
- Logging
- Advanced Topics
- Releases
- Troubleshooting