The iOS SDK provides methods for chat, custom signalling, file sharing, screen sharing, canvas
streaming, annotation, and live transcription within an active video session.
Chat
Send a Chat Message
Use sendMessage:isBroadCast:recipientIDs: to send a text message to all participants
or to specific recipients. No stream publishing or subscription is required to exchange messages —
the method works as soon as the room is connected.
Supports public (broadcast to all), private (one recipient), and group (multiple recipients) messaging.
Parameters
Parameter
Type
Description
message
String
Message text.
isBroadCast
Boolean
true for public broadcast; false for private or group messaging.
recipientIDs
Array
Array of Client IDs for private or group messaging. Pass nil when broadcasting.
Delegate Methods
Delegate
Description
-room:didACKSendMessage
Acknowledgment delivered to the sender.
-room:didMessageReceived
Recipients receive the message.
let recipients = ["clientId1", "clientId2"]
// Public message to all
room.sendMessage("Hello everyone!", isBroadCast: true, recipientIDs: nil)
// Private message to specific recipients
room.sendMessage("Hello!", isBroadCast: false, recipientIDs: recipients)
func room(_ room: EnxRoom?, didMessageReceived data: [Any]?) {
// data contains the incoming message
}
NSArray *recipients = @[@"clientId1", @"clientId2"];
// Public message to all
[room sendMessage:@"Hello everyone!" isBroadCast:YES recipientIDs:nil];
// Private message to specific recipients
[room sendMessage:@"Hello!" isBroadCast:NO recipientIDs:recipients];
- (void)room:(EnxRoom *)room didMessageReceived:(NSArray *)data {
// data contains the incoming message
}
Edit a Chat Message
Introduced in iOS SDK 3.0.20 (May 2025).
To update a message that has already been sent, call transactMessage: with a
dictionary that includes the original message ID and the corrected text. Set type
to "chat-update".
Detail
Value
Class
EnxRoom
Method
-(void)transactMessage:(NSDictionary *)options with type: "chat-update"
Parameters
Parameter
Type
Description
message
String
Updated message text.
messageId
String
Message ID of the original message (received in didMessageReceived / didACKSendMessage).
To remove a sent message, call transactMessage: with a dictionary containing the
message ID and type: "chat-delete". The server notifies all original recipients so
their UIs can remove the message.
Detail
Value
Class
EnxRoom
Method
-(void)transactMessage:(NSDictionary *)options with type: "chat-delete"
Use custom signalling to send structured business data between participants — polls, instructions,
or any application-specific payload that does not fit the standard chat message structure. Pass
any NSDictionary payload to one or more participants without wrapping it in a chat
message.
Available in iOS SDK 1.5.3 and later. Requires iOS 13 or later.
Upload a File for Sharing
Call shareFiles:isBroadcast:clientIds: to launch the system file picker and begin an
upload. The position parameter controls where the picker sheet appears on screen
using the EnxFilePosition enum. Only one file can be in flight per upload request.
First retrieve available files using -(NSArray *)getAvailableFiles, then initiate a
download. Set autoSave to YES to let the SDK save images and videos
directly to the device, or NO to receive raw Base64 data and handle storage yourself.
Each upload is assigned a numeric job ID. Use that ID to cancel a specific upload, or call
cancelAllUploads to stop all in-flight uploads at once.
-(void)cancelUpload:(int)jobID — cancel a specific upload by job ID.
-(void)cancelAllUploads — cancel all uploads.
Callback:didFileUploadCancelled
Upload Error Codes
Code
Meaning
5089
Storage permission denied.
5090
Auto-save to device failed.
5091
File sharing not available.
5092
Maximum one file per request.
1185
File exceeds the maximum allowed size.
1182
Upload failed.
5098
Cannot cancel — upload already complete.
5099
Invalid upload job ID.
5100
Corrupt file detected.
5102
No WebView context available.
Cancel File Download
-(void)cancelDownload:(int)jobID — cancel a specific download.
-(void)cancelAllDownloads — cancel all downloads.
Callback:didFileDownloadCancelled
Download Error Codes
Code
Meaning
5089
Storage permission denied.
5090
Auto-save to device failed.
1183
Download failed.
1181
File not available in this context.
5101
File already downloaded.
Screen Sharing
Enable screen sharing during room creation: { "screen_share": true }. Subscribers
receive the screen stream on Stream ID 101.
Screen sharing publishes the device's entire screen as a dedicated media stream at 6 fps.
Unlike regular streams, the screen share continues even when the user moves the app to the
background, making it suitable for walkthroughs, support sessions, and presentations.
Start Screen Sharing
Call startScreenShare on your EnxRoom instance. The SDK coordinates
with a Broadcast Extension process that handles screen capture at the OS level. Two separate
delegate callbacks reflect the two separate processes involved.
Detail
Value
Class
EnxRoom
Method
- (void)startScreenShare
Delegate Methods
Delegate
Description
-didStartBroadCast
Broadcast extension receives this when the screen stream is publishing.
-didStartScreenShareACK
Endpoint acknowledgment when the screen stream starts.
exitScreenShare signals the Broadcast Extension to exit the session entirely. This
must be called from the Broadcast Extension target, not the main app.
Detail
Value
Method
-(void)exitScreenShare
Delegate Methods
Delegate
Description
-didExitScreenShareACK
Parent app acknowledgment.
-didRequestedExitRoom
Fires on the screen sharing child client — triggers it to stop broadcast and disconnect.
Error code:5137 — screen sharing is not currently running.
Force Stop Screen Sharing
Moderator-only feature. Available in iOS SDK 2.1.2 and later. Also stops any active canvas stream.
Moderators can forcibly end any active screen share or canvas stream across the room with a single
call. This is useful for regaining control of the session if a participant has left sharing running
unintentionally.
Enable canvas streaming during room creation: { canvas: true }. The canvas stream is
received on Stream ID 102.
Canvas streaming lets a participant publish any UIView as a dedicated video stream.
This is the right tool when you need to share custom content — a presentation slide, a whiteboard,
a data visualisation, or any arbitrary view hierarchy — without sharing the entire screen.
Start Canvas Streaming
Pass the view you want to stream to startCanvas:. The SDK captures the view's render
output and publishes it as Stream ID 102.
Detail
Value
Class
EnxRoom
Method
(void)startCanvas:(UIView *)view
Delegate Methods
Delegate
Description
-room:didStartCanvasACK
Acknowledgment to the publisher.
-room:didCanvasStarted
Notification to all participants — use this to render the stream.
Available in iOS SDK 1.5.6 and later. Requires canvas streaming enabled in the room. Supports
Landscape mode only.
Annotation lets a participant draw on top of a remote stream in real time. The
EnxToolBar UI component provides drawing tools (pen, shapes, eraser, and more) that
the annotating participant can use without additional setup. The annotation layer is composited
over the selected stream and is visible to all participants.
Add Annotation Toolbar
Instantiate EnxToolBar and add it to your view hierarchy before starting annotation.
Position it so it does not obscure the stream it will annotate.
let toolBar = EnxToolBar(frame: CGRect(x: x, y: y, width: width, height: height))
EnxToolBar *toolBar = [[EnxToolBar alloc] initWithFrame:CGRectMake(x, y, width, height)];
Start Annotation
Pass the remote EnxStream you want to annotate. The SDK validates that the stream is
valid and that no other annotation or canvas operation is in progress.
A start-annotation request is already in progress.
5108
Invalid stream — cannot annotate this stream.
5109
Annotation publish failed.
5112
Landscape mode required.
5094
Stop annotation already in progress.
Live Transcription
Live transcription converts speech from active talkers to text in real time and broadcasts it to
subscribers. The transcription process starts with the first subscriber and stops when the last
unsubscribes — unless auto_transcribe is enabled, in which case it runs for the full
session.
Live Transcription is a subscription-based service. Contact your EnableX Sales or Account Manager
to enable it for your account before using any of the APIs below.
Room Configuration
Include a live_transcription object in the room creation payload to control
transcription behaviour at the room level:
Setting
Type
Description
live_transcription.language
String
Required. Language code, e.g. "english_us".
live_transcription.auto_transcribe
Boolean
Default false. Set true to auto-start at session start and save to file.
live_transcription.enable
Boolean
Default true. Set false to disable transcription for this room.
Start Live Transcription
Two methods are available depending on the desired scope:
The language parameter is optional; it defaults to "english_us". If
room-level transcription is already running when a second participant calls this method, they are
subscribed to the existing process rather than starting a new one.
Delegate Methods
Delegate
Description
-room:didACKStartLiveTranscription
Acknowledgment to the caller.
-room:didSelfTranscriptionOn
Self-transcription enabled for this endpoint.
-room:didRoomTranscriptionOn
Room-level transcription enabled — sent to all participants.
-room:didTranscriptionEvents
Receives transcribed text. Payload includes type (speech_recognising / speech_recognised), text, duration, and clientId.
enxRoom.startLiveTranscriptionForRoom("english_us")
func room(_ room: EnxRoom?, didRoomTranscriptionOn data: [Any]?) {
// Room-level transcription started
}
func room(_ room: EnxRoom?, didSelfTranscriptionOn data: [Any]?) {
// Self transcription started
}
func room(_ room: EnxRoom?, didTranscriptionEvents data: [Any]?) {
// Receive transcribed text in real time
// data: [{ "type": "speech_recognised", "text": "...", "clientId": "..." }]
}
[enxRoom startLiveTranscriptionForRoom:@"english_us"];
- (void)room:(EnxRoom *)room didRoomTranscriptionOn:(NSArray *)data {
// Room-level transcription started
}
- (void)room:(EnxRoom *)room didSelfTranscriptionOn:(NSArray *)data {
// Self transcription started
}
- (void)room:(EnxRoom *)room didTranscriptionEvents:(NSArray *)data {
// Receive transcribed text in real time
// data: [{ "type": "speech_recognised", "text": "...", "clientId": "..." }]
}
Error codes:3002 — not subscribed or transcription is already in progress.
Stop Live Transcription
Calling stopLiveTranscription unsubscribes the caller from the transcription feed.
The underlying transcription process stops when all subscribers have unsubscribed — unless
auto_transcribe is enabled, in which case it continues until the session ends.
Scope
Method
Self only
-(void)stopLiveTranscription
Delegate Methods
Delegate
Description
-room:didACKStopLiveTranscription
Acknowledgment to the caller.
-room:didSelfTranscriptionOff
Self-transcription turned off for this endpoint.
-room:didRoomTranscriptionOff
Room-level transcription turned off — sent to all participants.