pod install
step is crucial and must not be skipped for iOS development. Without it, the app will fail to build with native module errors.
Info.plist
:
AndroidManifest.xml
:
scanForDevices(onDeviceFound, timeoutMs = 10000)
onDeviceFound
: Callback function that receives an OmiDevice object when a device is foundtimeoutMs
: Scan timeout in milliseconds (default: 10000)connect(deviceId, onConnectionStateChanged)
deviceId
: The ID of the device to connect toonConnectionStateChanged
: Optional callback for connection state changesdisconnect()
isConnected()
getAudioCodec()
startAudioBytesListener(onAudioBytesReceived)
onAudioBytesReceived
: Callback function that receives audio bytes as a number arraystopAudioBytesListener(subscription)
subscription
: The subscription returned by startAudioBytesListenergetBatteryLevel()
pod install
in the ios directory.xcworkspace
file, not the .xcodeproj
file