-
Notifications
You must be signed in to change notification settings - Fork 0
Core Physical Operations Overview
Mr.P edited this page Aug 25, 2026
·
1 revision
Welcome to the Physical Operations documentation for the AIBuds SDK. This section covers reading and changing the mapping between physical device operations and device functions.
Browse the generated Wiki navigation for the pages in this section.
To manage physical operations, follow these steps:
- Connect to Device - Establish a connection with your AIBuds device
-
Check Protocol Conformance - Verify the device conforms to
DevicePhysicalOperationsAPI -
View Operation Mapping - Read
physicalOperationsMapping -
Assign Functions - Assign a
DeviceFunctionto aDeviceOperation
-
Physical Operations:
DeviceOperationrepresents clicks, long presses, touch-panel gestures, buttons, and supported slide gestures -
Device Functions:
DeviceFunctiondefines assignable behaviors such as playback, volume, voice-assistant, recording, and camera actions -
Mapping:
physicalOperationsMappingstores operation and function raw values asNSNumberkeys and values
Physical operations are accessed through DevicePhysicalOperationsAPI. Before reading or changing the mapping, verify protocol conformance:
```swift
guard let device = device as? DevicePhysicalOperationsAPI else {
print("Device does not support DevicePhysicalOperationsAPI")
return
}
```
```objc
id<AIBudsDevicePhysicalOperationsAPI> device =
(id<AIBudsDevicePhysicalOperationsAPI>)self.device;
if (![device conformsToProtocol:@protocol(AIBudsDevicePhysicalOperationsAPI)]) {
NSLog(@"Device does not support AIBudsDevicePhysicalOperationsAPI");
return;
}
```
- Check Protocol Conformance: Always verify the device supports the required protocol
-
Use Reported Operations: Present operations contained in
physicalOperationsMapping - Handle Errors: Implement proper error handling in completion handlers
- Provide Feedback: Inform users when button mappings are successfully updated
- Button mapping availability depends on the device model
- An enum case being present in
DeviceOperationorDeviceFunctiondoes not guarantee that every device supports it - An operation or function can be unsupported even when its enum value exists; handle the assignment result
- The SDK exposes a dictionary rather than a
KeyMappingmodel or asynchronous get-mapping method
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