Skip to main content

Installation

Requirements: iOS 14.0+, Xcode 15.0+, Swift 5.7+ The iOS SDK ships as pre-built frameworks. Add them to your Xcode target: Frameworks are located at sdk/ios/ in the Plaud SDK repo.
SDK frameworks are compiled for arm64 (physical devices only). Simulator is not supported.
Try the Plaud Embedded Skill to have your coding agent help you with your iOS implementation.
Visit our GitHub repo for more details on the skill.

Methods

Plaud Device SDK Initialization

The SDK is initialized with a User Token and your regional domain.
If you haven’t onboarded to the Plaud Developer Platform, see our quickstart onboarding steps.If you’d like more details on how to retrieve your User Token and the token exchange flow, see the Authentication API reference.
Swift
userAccessToken
string
required
User Access Token (JWT), used for device authentication. The handshake token is automatically parsed from the JWT sub field.
customDomain
string
required
Your regional Plaud server domain without https:// prefix. All SDK network requests use this domain.For more information on how to find your regional server domain, see the Authentication API docs.

Refreshing User Token

If the User Token is refreshed (e.g., after re-login), you can update it:
Swift
newToken
string
required
Refreshed User Token (JWT)
This automatically updates the handshake token and refreshes the RSA key pair.

Connecting (binding) to a Plaud Device

The .startScan() will call the bleScanResult callback defined in the PlaudDeviceAgentProtocol
Swift
bleDevice
BleDevice
required
A scanned/connected device
deviceToken
deviceToken
If needed, a unique identifier for that device

PlaudDeviceAgentProtocol Callbacks

The PlaudDeviceAgentProtocol is a delegate protocol with a few key callbacks for the PlaudDeviceAgent. See the Protocols section for the full list of callbacks.
Binding is also tied to app installation. If a user is uninstalling your mobile app, make sure to unbind your Plaud device.

Unbinding a device

Plaud devices can only be bound to one application at a time. This is done to properly secure and encrypt files stored on a Plaud device. When a user wants to unbind a Plaud device (whether to use with another Plaud Embedded App or the core Plaud app), use the .depair method.
Swift
clear
Bool
required
Set this to true to clear all connections

File Synchronization

The exportAudio method exports audio files from Plaud device to your users’ phone, reporting progress through the AudioExportCallback. The .getFileList accesses files on your users’ Plaud device, and the .deleteFile method will delete an audio file off of your users’ Plaud device.
Swift
sessionId
Int
required
Session ID
outputDir
String
required
Output Directory
format
AudioExportFormat
required
.opus | .mp3 | .wav | .pcm
channels
Int
pcm = 0, mp3 = 1, wav = 2, opus = 3
callback
AudioExportCallback
required
See AudioExportCallback for details.func onProgress(_ progress: Int, message: String)func onComplete(outputPath: String)func onError(_ error: String)
For large audio files, we recommend UX considerations:
  • Progress indicators and setting expectations for long transfers (i.e. “This file is large. May take ~X minutes”)
  • Supporting background/resumable transfer so closing the app doesn’t kill the session.
  • Using WiFi Fast Transfer (see below)

WiFi Fast Transfer

An alternative to a BLE (Bluetooth Low Energy) file transfer, WiFi Fast Transfer is ~10x faster than BLE transfers.
Requires the Hotspot Configuration entitlement in your iOS app settings.

Protocol Callbacks

The WiFi Fast Transfer has two key callbacks, one on the PlaudDeviceAgentProtocol and another on the AudioExportCallback.
While faster than BLE transfers, we still recommend the following UX considerations for WiFi Fast Transfer syncs:
  • Progress indicators and setting expectations for long transfers (i.e. “This file is large. May take ~X minutes”)
  • Supporting background/resumable transfer so closing the app doesn’t kill the session.

Firmware Update (OTA)

The Embedded SDK handles the entire OTA flow: version query → download → MD5 verify → CRC → BLE packet push → device restart → reconnect.

Check for Firmware Updates

Swift
firmwareCheck
(PlaudFirmwareCheckResult) -> Void
required
Callback function with type PlaudFirmwareCheckResult

Download Firmware Update

Swift
progress
(PlaudFirmwarePhase, Float) -> Void
required
Callback that reports firmware update progress.
  • phase: Current phase of the update (PlaudFirmwarePhase)
  • percentage: Progress from 0.0 to 1.0
completion
(PlaudFirmwareUpdateResult) -> Void
required
Callback when the update completes.
If you already have the firmware file downloaded, use pushFirmwareFile() instead:

Push Firmware Update

Swift
filePath
String
required
Full path to the locally downloaded firmware file
toVersion
String
required
Target firmware version to update to (e.g., “V1.2.8”)
progress
(PlaudFirmwarePhase, Float) -> Void
required
Callback that reports firmware update progress.
  • phase: Current phase (downloading / installing / restarting / complete)
  • percentage: Progress from 0.0 to 1.0
completion
(PlaudFirmwareUpdateResult) -> Void
required
Callback when the update completes with success, version, and errorMessage fields.

Protocols

The Embedded SDK is delegate-driven. You implement protocols and assign yourself as the delegate to receive device events, transfer progress, and results. These three protocols should cover most use cases.
Most callbacks are delivered on the SDK’s internal dispatch queues — not the main thread. Marshal to the main queue before touching UIKit or published state.

PlaudDeviceAgentProtocol

The primary delegate for PlaudDeviceAgent. Assign it once and it drives the entire BLE lifecycle — scan, connect, bind, device state, recording, and file sync.
Swift
blePenState is the only required member. Every other callback is @objc optional — implement only the ones you need.
The most commonly used callbacks, grouped by concern:
The SDK also exposes a lower-level BleAgentProtocol on BleAgent with 60+ required callbacks. Prefer PlaudDeviceAgentProtocol — the facade handles the handshake, decryption, and format conversion for you, and lets you implement only the callbacks you care about.

AudioExportCallback

Reports progress, completion, and errors for .exportAudio (BLE) and .exportAudioViaWiFi (WiFi).
Swift
onProgress(_ progress: Int, message: String)
func
required
Export progress, 0100, with a human-readable status message.
onComplete(outputPath: String)
func
required
Called when decoding finishes; outputPath is the full path to the written file.
onError(_ error: String)
func
required
Called if export fails, with a description of the error.

PlaudWiFiAgentProtocol

The delegate for PlaudWiFiAgent, used during WiFi Fast Transfer. Assign it before calling connectWifi(...). The handshake must complete (wifiHandshake with status 0) before listing or transferring files.
Swift
All members are @objc optional.
WiFi Fast Transfer requires the Hotspot Configuration entitlement in your app. See WiFi Fast Transfer for the full connect-and-transfer flow.