In-Session Communication
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.
| Detail |
Value |
| Class |
EnxRoom |
| Method |
-(void)sendMessage:(NSString *)message isBroadCast:(BOOL)broadcast recipientIDs:(NSArray *)clientIds |
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. |
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). |
type |
String |
Use "chat-update". |
Delegate Methods
| Delegate |
Description |
-room:didACKUpdateMessage |
Sender acknowledgment. |
-room:didMessageUpdate |
Recipients receive the edited message. |
NSDictionary *editOptions = @{
@"message": @"This is my edited message",
@"messageId": @"MSG_ID",
@"type": @"chat-update"
};
[room transactMessage:editOptions];
- (void)didACKUpdateMessage:(NSArray *)data {
// Edit acknowledged
}
- (void)didMessageUpdate:(NSArray *)data {
// Recipients notified of edited message
}
Delete a Chat Message
Introduced in iOS SDK 3.0.20 (May 2025).
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" |
Parameters
| Parameter |
Type |
Description |
messageId |
String |
Message ID to delete. |
type |
String |
Use "chat-delete". |
Delegate Methods
| Delegate |
Description |
-room:didACKDeleteMessage |
Sender acknowledgment. |
-room:didMessageDelete |
Recipients notified of deletion. |
NSDictionary *deleteOptions = @{
@"messageId": @"MSG_ID",
@"type": @"chat-delete"
};
[room transactMessage:deleteOptions];
- (void)didACKDeleteMessage:(NSArray *)data {
// Delete acknowledged
}
- (void)didMessageDelete:(NSArray *)data {
// Recipients notified of deletion
}
Custom Signalling
Send Custom Data
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.
| Detail |
Value |
| Class |
EnxRoom |
| Method |
-(void)sendUserData:(NSDictionary *)Message isBroadCast:(BOOL)broadcast recipientIDs:(NSArray *)clientIds |
Parameters
| Parameter |
Type |
Description |
Message |
Object |
NSDictionary with any custom keys. |
isBroadCast |
Boolean |
true for broadcast; false for targeted delivery. |
recipientIDs |
Array |
Client IDs when not broadcasting. |
Delegate: -room:didUserDataReceived — fires on each recipient with the custom dictionary payload.
Error codes: 5127 — data transfer rate exceeds the 100 KB/s limit.
NSDictionary *customData = @{
@"sender": @"Sender Name",
@"message": @"Custom payload",
@"type": @"poll"
};
NSArray *recipients = @[@"clientId1"];
[room sendUserData:customData broadCast:NO recipientIDs:recipients];
- (void)room:(EnxRoom *)room didUserDataReceived:(NSArray *)data {
// Received custom signal
}
File Sharing
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.
| Detail |
Value |
| Class |
EnxRoom |
| Method |
-(void)shareFiles:(EnxFilePosition)position isBroadcast:(BOOL)isBroadcast clientIds:(NSArray *)clientIds |
Parameters
| Parameter |
Type |
Description |
position |
Enumerated |
Placement of the file picker UI: Top, Bottom, or Center. |
isBroadcast |
Boolean |
true to share with all participants; false for selected users. |
clientIds |
Array |
Client IDs when not broadcasting. |
Sender Delegate Methods
| Delegate |
Description |
-room:didInitFileUpload |
Upload process has started. |
-room:didFileUploaded |
File successfully uploaded. |
-room:didFileUploadFailed |
Upload failed. |
Receiver Delegate Methods
| Delegate |
Description |
-room:didFileUploadStarted |
File upload is in progress — receiver is notified. |
-room:didFileAvailable |
File is ready to download. |
[room shareFiles:Top isBroadcast:YES clientIds:nil];
- (void)room:(EnxRoom *)room didInitFileUpload:(NSArray *)data {
// Upload started
}
- (void)room:(EnxRoom *)room didFileUploaded:(NSArray *)data {
// Upload complete
}
- (void)room:(EnxRoom *)room didFileAvailable:(NSArray *)data {
// Receiver: file ready to download
}
Download a Shared File
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.
| Detail |
Value |
| Method |
-(void)downloadFile:(NSDictionary *)file autoSave:(BOOL)flag |
Parameters
| Parameter |
Type |
Description |
file |
Object |
File object received from didFileAvailable. |
autoSave |
Boolean |
true to auto-save images/videos; false to receive Base64 raw data. |
Callbacks
| Delegate |
Description |
-room:didFileDownloaded |
File downloaded successfully. |
-room:didFileDownloadFailed |
Download failed. |
// Get available files
[room getAvailableFiles];
// Initiate download
[room downloadFile:fileObject autoSave:YES];
- (void)room:(EnxRoom *)room didFileDownloaded:(NSString *)data {
// File downloaded
}
- (void)room:(EnxRoom *)room didFileDownloadFailed:(NSArray *)data {
// Download failed
}
Cancel File Upload
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. |
[enxRoom startScreenShare];
- (void)didStartBroadCast:(NSArray *)data {
// Broadcast extension started
}
- (void)room:(EnxRoom *)room didStartScreenShareACK:(NSArray *)data {
// Screen sharing started
}
Stop Screen Sharing
| Detail |
Value |
| Method |
-(void)stopScreenShare |
Delegate Methods
| Delegate |
Description |
-didStoppedBroadCast |
Broadcast extension when unpublishing. |
-didStopScreenShareACK |
Endpoint acknowledgment when screen sharing stops. |
[enxRoom stopScreenShare];
- (void)didStoppedBroadCast:(NSArray *)data {
// Broadcast extension stopped
}
- (void)room:(EnxRoom *)room didStopScreenShareACK:(NSArray *)data {
// Screen sharing stopped
}
Exit Screen Sharing
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.
| Detail |
Value |
| Method |
-(void)stopAllSharing |
| Callback |
didACKStopAllSharing |
[enxRoom stopAllSharing];
- (void)room:(EnxRoom *)room didStopAllSharingACK:(NSArray *)data {
// All sharing stopped
}
Canvas Streaming
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. |
[room startCanvas:myUIView];
- (void)room:(EnxRoom *)room didStartCanvasACK:(NSArray *)data {
// Publisher: canvas streaming started
}
- (void)room:(EnxRoom *)room didCanvasStarted:(EnxStream *)stream {
// All participants: render the canvas stream
stream.enxPlayer.frame = yourFrame;
[yourView addSubview:stream.enxPlayer];
}
Error Codes
| Code |
Meaning |
| 5105 | Canvas already active. |
| 5107 | A canvas request is already in progress. |
| 5103 | Canvas or screen sharing is already running — only one can be active at a time. |
| 5110 | Canvas publish failed. |
Stop Canvas Streaming
| Detail |
Value |
| Method |
-(void)stopCanvas |
Delegate Methods
| Delegate |
Description |
-room:didStoppedCanvasACK |
Acknowledgment to the publisher. |
-room:didCanvasStopped |
Notification to all participants — remove the stream from the UI. |
[room stopCanvas];
- (void)room:(EnxRoom *)room didCanvasStopped:(EnxStream *)stream {
[stream.enxPlayer removeFromSuperview];
}
Annotation
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.
Instantiate EnxToolBar and add it to your view hierarchy before starting annotation.
Position it so it does not obscure the stream it will annotate.
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.
| Detail |
Value |
| Class |
EnxRoom |
| Method |
-(void)startAnnotation:(EnxStream *)stream |
Delegate Methods
| Delegate |
Description |
-room:didStartAnnotationACK: |
Acknowledgment to the annotator. |
-room:didAnnotationStarted: |
Notification to all participants. |
Stop Annotation
| Detail |
Value |
| Method |
-(void)stopAnnotation |
Delegate Methods
| Delegate |
Description |
-room:didStoppedAnnotationACK: |
Acknowledgment to the annotator. |
-room:didAnnotationStopped: |
Notification to all participants. |
[enxRoom startAnnotation:remoteStream];
[enxRoom stopAnnotation];
- (void)room:(EnxRoom *)room didStartAnnotationACK:(NSArray *)data { }
- (void)room:(EnxRoom *)room didAnnotationStarted:(NSArray *)data { }
- (void)room:(EnxRoom *)room didStoppedAnnotationACK:(NSArray *)data { }
- (void)room:(EnxRoom *)room didAnnotationStopped:(NSArray *)data { }
Annotation Error Codes
| Code |
Meaning |
| 5093 | Access denied — insufficient permissions. |
| 5104 | Annotation already active. |
| 5106 | 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:
| Scope |
Method |
| Self only |
-(void)startLiveTranscription:(NSString *)language |
| Entire room |
-(void)startLiveTranscriptionForRoom:(NSString *)language |
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"];
- (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. |
[enxRoom stopLiveTranscription];
- (void)room:(EnxRoom *)room didRoomTranscriptionOff:(NSArray *)data {
// Room transcription stopped
}
- (void)room:(EnxRoom *)room didSelfTranscriptionOff:(NSArray *)data {
// Self transcription stopped
}