TwilioConversationsClient Class Reference

Inherits from NSObject
Declared in TwilioConversationsClient.h

Overview

This class declares the entity which represents the local conversationsClient.

  delegate

ConversationsClient delegate. Set this property to be notified on action completion.

@property (nonatomic, weak, nullable) id<TwilioConversationsClientDelegate> delegate

Discussion

ConversationsClient delegate. Set this property to be notified on action completion.

Declared In

TwilioConversationsClient.h

  accessManager

Access manager to use with this client.

@property (nonatomic, readonly, strong, nonnull) TwilioAccessManager *accessManager

Discussion

Access manager to use with this client.

Declared In

TwilioConversationsClient.h

  identity

Identity of this conversationsClient on the network for incoming calls.

@property (nonatomic, readonly, strong, nullable) NSString *identity

Discussion

Identity of this conversationsClient on the network for incoming calls.

Declared In

TwilioConversationsClient.h

  listening

Reflects current listening state of the conversationsClient.

@property (nonatomic, assign, readonly) BOOL listening

Discussion

Reflects current listening state of the conversationsClient.

Declared In

TwilioConversationsClient.h

+ conversationsClientWithToken:delegate:

This class method creates an conversationsClient using a token and a dictionary of parameters. A TwilioAccessManager will be created internally.

+ (nullable TwilioConversationsClient *)conversationsClientWithToken:(nonnull NSString *)token delegate:(nullable id<TwilioConversationsClientDelegate>)delegate

Parameters

token
  • A string (JWT token) describing the conversationsClient’s expiration as well as the incoming and outgoing capability.
delegate

Return Value

Reference of type TwilioConversationsClient.

Discussion

This class method creates an conversationsClient using a token and a dictionary of parameters. A TwilioAccessManager will be created internally.

Declared In

TwilioConversationsClient.h

+ conversationsClientWithAccessManager:delegate:

This class method creates an conversationsClient using a TwilioAccessManager.

+ (nullable TwilioConversationsClient *)conversationsClientWithAccessManager:(nonnull TwilioAccessManager *)accessManager delegate:(nullable id<TwilioConversationsClientDelegate>)delegate

Parameters

accessManager
  • Instance of TwilioAccessManager.
delegate

Return Value

Reference of type TwilioConversationsClient.

Discussion

This class method creates an conversationsClient using a TwilioAccessManager.

Declared In

TwilioConversationsClient.h

– listen

Register TwilioConversationsClient within Twilio infrastructure.

- (void)listen

Discussion

Register TwilioConversationsClient within Twilio infrastructure.

This method will result in one of the following delegate methods being called:

- (void)conversationsClientDidStartListeningForInvites:(TwilioConversationsClient *)conversationsClient;

- (void)conversationsClient:(TwilioConversationsClient *)conversationsClient didFailToStartListeningWithError:(NSError *)error;

If another party starts a conversation with your conversationsClient, you will receive the delegate call:

- (void)conversationsClient:(TwilioConversationsClient *)conversationsClient didReceiveInvite:(TWCInvite *)invite;

Declared In

TwilioConversationsClient.h

– unlisten

Remove conversationsClient registration within Twilio infrastructure.

- (void)unlisten

Discussion

Remove conversationsClient registration within Twilio infrastructure.

This method may result in the following delegate methods being called:

  • (void)conversationsClientDidStopListeningForInvites:(TwilioConversationsClient )conversationsClient error:(NSError )error;

See Also

Declared In

TwilioConversationsClient.h

– inviteToConversation:handler:

Invites a single client to a new conversation.

- (nullable TWCOutgoingInvite *)inviteToConversation:(nonnull NSString *)client handler:(nonnull TWCInviteAcceptanceBlock)handler

Parameters

client

The client identity to invite.

handler

A handler to be called when the invite finishes.

Return Value

A TWCOutgoingInvite object which can be used to cancel the request.

Discussion

Invites a single client to a new conversation.

Note: The default local media configuration is used (publish audio, but not video).

Declared In

TwilioConversationsClient.h

– inviteToConversation:localMedia:handler:

Invites a single client to a new conversation.

- (nullable TWCOutgoingInvite *)inviteToConversation:(nonnull NSString *)client localMedia:(nonnull TWCLocalMedia *)localMedia handler:(nonnull TWCInviteAcceptanceBlock)handler

Parameters

client

The client identity to invite.

localMedia

The local media you would like to share with clients.

handler

A handler to be called when the invite finishes.

Return Value

A TWCOutgoingInvite object which can be used to cancel the request.

Discussion

Invites a single client to a new conversation.

Declared In

TwilioConversationsClient.h

– inviteManyToConversation:localMedia:handler:

Invites one or more clients to a new conversation.

- (nullable TWCOutgoingInvite *)inviteManyToConversation:(nonnull NSArray<NSString*> *)clients localMedia:(nonnull TWCLocalMedia *)localMedia handler:(nonnull TWCInviteAcceptanceBlock)handler

Parameters

clients

The clients to invite. An array of NSStrings.

localMedia

The local media you would like to share with clients.

handler

A handler to be called when the invite finishes.

Return Value

A TWCOutgoingInvite object which can be used to cancel the request.

Discussion

Invites one or more clients to a new conversation.

Declared In

TwilioConversationsClient.h

+ version

This returns the SDK version as a string.

+ (nonnull NSString *)version

Discussion

This returns the SDK version as a string.

Declared In

TwilioConversationsClient.h

+ logLevel

Retrieve the log level in Twilio SDK.

+ (TWCLogLevel)logLevel

Return Value

Current TWCLogLevel

Discussion

Retrieve the log level in Twilio SDK.

Declared In

TwilioConversationsClient.h

+ setLogLevel:

Set the log level in Twilio SDK.

+ (void)setLogLevel:(TWCLogLevel)logLevel

Parameters

logLevel

The TWCLogLevel in use by the system.

Discussion

Set the log level in Twilio SDK.

Declared In

TwilioConversationsClient.h

+ setAudioOutput:

Set the audio output speaker for current client device.

+ (void)setAudioOutput:(TWCAudioOutput)audioOutput

Parameters

audioOutput

The TWCAudioOutput in use by the system.

Discussion

Set the audio output speaker for current client device.

Declared In

TwilioConversationsClient.h