API Reference

The IMIconnect UI SDK for iOS builds on the message transport capabilities exposed within the Core SDK through a collection of customisable user interface components. These components may be used to easily integrate a fully featured rich messaging capability within the host application.

The information below serves as a reference and details all of the public classes, interfaces, and methods. A quick start guide is also available.

ICConversationSplitViewController

This view controller leverages the functionality of the lower level components and provides the necessary wiring to combine them into a fully-featured in-app chat experience with minimal code.
The activity supports the display of the user conversation list and provides a means to open them or create new conversations. Selecting a conversation displays the conversation view and allows users to read, compose and send messages.

Prerequisites

This component requires that a valid ICMessageStore instance is set within the Core SDK.

Adaptive Layout

The layout of the view controller adapts to the device display, typically when running on a iPhone the activity will display the conversation list full screen when a conversation is displayed this replaces the conversation list display. Navigating back from the conversation will cause the conversation list to be re-displayed.
When running on an iPad, the layout is split into two sections. The conversation list is shown on the left and the active conversation is shown on the right.

Properties

ParameterTypeDescription
categoriesNSMutableArrayThe categories that should be displayed to the user while creating a new conversation
customerDetailsICCustomerDetailsRefer - ICCustomerDetails
class
avatarUIImageThe avatar that will be displayed next to every conversation

ICConversationsViewController

Displays a list of conversations for the current user and a floating action button for creating a new conversation; use this view controller when you wish to integrate a conversation list within your own layouts.

The view controller does not open or create new conversations directly; instead, events are raised through the ICConversationsViewControllerDelegate and it is your responsibility to write the code in response to those events if you are not using ICConversationSplitViewController.

Message data is lazily loaded from a local ICMessageStore and remotely from the IMIconnect backend services. To achieve the best possible user experience, it is recommended that you configure an appropriate message synchronisation policy within the Core SDK in order to pre-fetch data.

Prerequisites

This component loads data from ICMessageStore and therefore requires that a valid instance is set within the Core SDK, please refer to ICMessagingStore.

If you are not using ICConversationSplitViewController, you must implement the ICConversationsViewControllerDelegate.

Properties

delegateICConversationsViewControllerDelegateThe delegate of the ICConversationsViewController
avatarUIImageThe avatar that will be displayed next to each conversation

Methods

  • (void)reload
Reloads the whole conversation list

Responding to events

Whenever a user selects a conversation or taps the create conversation button, the appropriate event will be raised through the ICConversationsViewControllerDelegate interface.

ICConversationsViewControllerDelegate

Methods:

  • (void)conversationsViewController: (ICConversationsViewController )conversationsViewController didSelectThread:(ICThread )thread

Invoked when a user selects a conversation within the view controller. Conversations are represented by an ICThread object, please refer to the Core SDK documentation for details. Typically, you will use the id within ICThread to open the conversation.

  • (void)conversationsViewControllerDidSelectCreateThread: (ICConversationsViewController *)conversationsViewController
Invoked when a user taps the create conversation button. You are responsible for creating the new thread and displaying the conversation UI to the user. If you have multiple contact points you may wish to consider using ICConversationCategoryViewController as an easy way to present these.Use the ICMessaging createThread method within the Core SDK to create a new thread, please refer to the Core SDK documentation for more information.

Styling

ICInboxTableView

This component displays a list of a conversations that are provided via the dataSource

This component displays a list of a conversations that are provided via the dataSource

Properties

inboxDataSourceidSee ICInboxTableViewDataSource description
inboxDelegateidSee ICInboxTableViewDelegate
cellFactoryICMessageTableViewCellFactorySee ICMessageTableViewCellFactory description
selectedIndexesNSMutableArrayThe selected indexes
backgroundColorUIColorThe table view background color

Methods:

  • (void)reloadMessages

Reloads the inbox display.

  • (void)addMessagePartViewFactory:(id)messagePartViewFactory forContentType:(NSString *)contentType

Adds a messagePartViewFactory instance in the list of all messagePartViewFactories

  • to create the MessagePartView
  • The content type is used to retrieve the good factory
  • based on the content type of the encountered message part.
  • (void)enableMultipleSelection:(BOOL)isEnabled

Enables the multiple row selection

  • (void)scrollToMessage:(id)messageData animated:(BOOL)animated
Scrolls to a message in the inbox

ICInboxTableViewDataSource

Contains the methods needed to populate the ICInboxTableView with some data

Methods:

  • (NSInteger)numberOfMessagesInInboxTableView:(ICInboxTableView *)inboxTableView

Tells the data source to return the number of messages that will be displayed in the inbox table view

  • (id)inboxTableView:(ICInboxTableView )inboxTableView messageDataForRowAtIndexPath:(NSIndexPath )indexPath

Asks the data source the message data that will be represented by the cell

  • (NSArray )inboxTableView:(ICInboxTableView )inboxTableView messagePartsFromMessageData:(id)messageDat

Asks the data source the message part that will be displayed for a message data

  • (NSInteger)inboxTableView:(ICInboxTableView )inboxTableView numberOfUnreadMessagesAtIndexPath:(NSIndexPath )indexPath

Tells the data source to return the number of unread messages for the cell

  • (BOOL)inboxTableView:(ICInboxTableView )inboxTableView shouldDisplayUnreadIndicatorAtIndexPath:(NSIndexPath )indexPath

Tells the data source to display the unread indicator

  • (UIImage )inboxTableView:(ICInboxTableView )inboxTableView
    avatarForMessageData:(id)messageData
Asks the data source to provide the avatar a specified message

ICInboxTableViewDelegate

Contains the methods needed to handle an event on the ICInboxTableView.

Methods:

  • (CGFloat)inboxTableView:(ICInboxTableView )inboxTableView heightForMessageCellAtIndexPath:(NSIndexPath )indexPath

Asks the data source for the height to use for a message cell in a specified location.

  • (void)inboxTableView:(ICInboxTableView )inboxTableView didSelectMessageDataAtIndexPath:(NSIndexPath )indexPath

Tells the delegate that a message has been selected

  • (void)inboxTableView:(ICInboxTableView )inboxTableView didDeleteMessageDataAtIndexPath:(NSIndexPath )indexPath
Tells the delegate that a message has been deleted

ICInboxMessageTableViewCell

This component is a concrete implementation of the ICMessageTableViewCell.

Properties:

dateFontUIFontThe font of the date label
dateTextColorUIColorThe text color of the date label
badgeFontUIFontThe font of the badge label
badgeTextColorUIColorThe text color of the badge
badgeBackgroundColorUIColorThe background color of the badge
badgeCornerRadiusCGFloatThe corner radius of the badge
unreadMessageFontUIFontThe unread message font
unreadMessageTextColorUIColorThe unread message text color
unreadDateFontUIFontThe unread date font
unreadDateTextColorUIColorThe unread date text color
readMessageFontUIFontThe read message font
readMessageTextColorUIColorThe read message text color
titleFontUIFontThe read message font
titleTextColorUIColorThe read message text color
containerTextColorUIColorThe container text color

ICMessageTableViewCellFactory

This factory has the responsibility to create all the table view cells that will be displayed in the inbox.

-(NSString )reuseIdentifierForMessageData:(id)messageData fromMessageParts:(NSArray )messageParts :(NSDictionary *)messagePartViewFactoriesRetrieves an identifier used to reuse an existing cell
-(ICMessageTableViewCell )cellForIdentifier:(NSString )identifier
fromMessageParts:(NSArray )messageParts
withMessagePartViewFactories:(NSDictionary
)messagePartViewFactories
Creates a cell that will represent the message parts passed in parameter

ICConversationViewController

The ICConversationViewController displays messages within a conversation and provides a message composer.

Messages are displayed to the user in chronological order and new messages can be composed and published directly from the view controller. Supports typing indicators, delivery and read receipts, message attachments and connection indicator.

Message data is lazily loaded from a local ICMessageStore and remotely from the IMIconnect backend services. To achieve the best possible user experience, it is recommended that you configure an appropriate message synchronisation policy within the Core SDK in order to pre-fetch data.

Prerequisites

This component loads data from ICMessageStore and therefore requires that a valid instance is set within the Core SDK, please refer to ICMessaging messageStore.

Properties:

threadICThreadSee CoreSDK reference guide
flavorICMessageComposerFlavorSee the ICMessageComposerFlavor description.
delegateidSee ICConversationViewControllerDelegate description

Methods:

-(void)reloadMessagesReload all the messages of the current conversation

Styling

ICMessageComposerFlavor

This class allows you to customise the composer. You can select the plugins that will be displayed in the composer and the composer style.

Properties:

pluginsNSArrayAn array of plugins that will be displayed in the composer.
styleICMessageComposerStyleSee ICMessageComposerStyle description

Methods:

  • (instancetype)flavorWithStyle:(ICMessageComposerStyle )style
    plugins:(NSArray
    )plugins;
Instantiates an ICMessageComposerFlavor with a style and some plugins

ICMessageComposerStyle

Determines the style (color and appearances) of the message composer.

Properties:

composerBackgroundColorUIColorThe composer background color
borderWidthCGFloatThe border width
borderColorUIColorThe border color
cornerRadiusCGFloatThe corner radius
backgroundColorUIColorThe background color
messageTextColorUIColorThe message text color
messageFontUIFontThe message font

ICConversationCollectionView

This component will display the incoming and outgoing messages in some bubbles.

Properties

conversationDataSourceidSee ICConversationCollectionViewDataSource description
conversationDelegateidSee ICConversationCollectionViewDelegate description
cellFactoryICMessageCollectionViewCellFactorySee ICMessageCollectionViewCellFactory description
isScrollingTopBOOLInforms if the user is currently scrolling to top
backgroundColorUIColorThe background color

Methods:

  • (void)reloadMessages

Reloads the conversation display.

  • (void)addMessagePartViewFactory:(id)messagePartViewFactory forContentType:(NSString *)contentType

Adds a messagePartViewFactory instance in the list of all messagePartViewFactories to create the MessagePartView
The content type is used to retrieve the good factory

  • (void)scrollToBottomAnimated:(BOOL)animated

Scrolls the conversation collection view to the bottom

  • (void)scrollToMessage:(id)messageData animated:(BOOL)animated
Scrolls to a message in the conversation

ICConversationCollectionViewDataSource

Contains the methods needed to populate the ICConversationCollectionView with some data

Methods:

  • (NSInteger)conversationCollectionView:(ICConversationCollectionView )conversationCollectionView
    numberOfMessagesForMessageGroup:(NSString
    )messageGroup

Tells the data source to return the number of messages that will be displayed in the conversation collection view

  • (id)conversationCollectionView:(ICConversationCollectionView )conversationCollectionView
    messageDataForItemAtIndex:(NSInteger)index
    forMessageGroup:(NSString
    )messageGroup

Asks the data source the message data that will be represented by the cell

  • (NSArray )conversationCollectionView:(ICConversationCollectionView )conversationCollectionView
    messagePartsFromMessageData:(id)messageData

Asks the data source the message part that will be displayed for a message data

  • (NSInteger)numberOfMessageGroupsInConversationCollectionView:(ICConversationCollectionView *)conversationCollectionView

Tells the data source to return the number of groups that will be displayed in the conversation collection view

  • (NSString )conversationCollectionView:(ICConversationCollectionView )conversationCollectionView
    messageGroupAtIndex:(NSInteger)index

Asks the data source the message group that will be displayed at an index

  • (BOOL)conversationCollectionView:(ICConversationCollectionView *)conversationCollectionView
    shouldDisplayStatusForMessageData:(id)messageData
Asks the data source to return the bool value of messages that will be displayed in the conversation collection view

ICConversationCollectionViewDelegate

Contains the methods needed to handle an event on the ICConversationCollectionView.

Methods:

  • (CGFloat)conversationCollectionView:(ICConversationCollectionView )conversationCollectionView
    heightForMessageCellAtIndexPath:(NSIndexPath
    )indexPath

Asks the delegate for the height to use for a message cell in a specified location.

  • (CGFloat)conversationCollectionView:(ICConversationCollectionView *)conversationCollectionView
    heightForMessageGroupAtIndex:(NSInteger)index

Asks the delegate for the height to use for a message group in a specified location.

  • (void)conversationCollectionView:(ICConversationCollectionView )conversationCollectionView
    didSelectAttachmentMessagePart:(ICMediaMessagePart
    )mediaMessagePart

Tells the delegate that an attachment has been selected

  • (void)conversationCollectionView:(ICConversationCollectionView *)conversationCollectionView
    didRemoveMessagePart:(id)messagePart

Tells the delegate that a message part has been deleted

  • (void)conversationCollectionView:(ICConversationCollectionView *)conversationCollectionView
    didSelectRetryForMessageData:(id)messageData
Tells the delegate that the user is trying to re-send a message

ICAlertMessageCollectionViewCell

Displays an alert event in the ICConversationCollection. This alert could be a conversation that is now closed or reopened for example.

Properties:

containerBackgroundColorUIColorThe container background color.
containerCornerRadiusCGFloatThe corner radius of the bubble.
containerTextColorUIColorThe text color of the container.
containerFontUIFontThe font of the container.

ICIncomingMessageCollectionViewCell

Displays the incoming messages in the ICConversationCollection. It has the appearance of a bubble.

Properties:

containerBackgroundColorUIColorThe container background color.
containerCornerRadiusCGFloatThe corner radius of the bubble.
containerTextColorUIColorThe text color of the container.
containerFontUIFontThe font of the container.

ICOutgoingMessageCollectionViewCell

Displays the outgoing messages in the ICConversationCollection. It has the appearance of a bubble.

Properties:

containerBackgroundColorUIColorThe container background color.
containerCornerRadiusCGFloatThe corner radius of the bubble.
containerTextColorUIColorThe text color of the container.
containerFontUIFontThe font of the container.
messageStateFontUIFontThe message state font.
timeFontUIFontThe font of the time.

Methods:

-(void)showFooterShows the footer of the cell.
-(void)hideFooterHides the footer of the cell.

ICConversationHeaderCollectionReusableView

Displays the group where the messages belong. Those groups represents by default the day when the messages have been received.

Properties

messageGroupFontUIFontThe message group font.
messageGroupTextColorUIColorThe message group text color.

ICMessageCollectionViewCellFactory

This factory has the responsibility to create all the collection view cells that will be displayed in the conversation.

Methods:

SyntaxDescription
-(NSString )reuseIdentifierForMessageData:(id)messageDatafromMessageParts:(NSArray )messagePartswithMessagePartViewFactories:(NSDictionary *)messagePartViewFactoriesRetrieves an identifier used to reuse an existing cell.
-(UINib )nibForIdentifier:(NSString )identifier
fromMessageParts:(NSArray )messageParts
withMessagePartViewFactories:(NSDictionary
)messagePartViewFactories
Retrieves the nib associated to the current identifier
in order to be registered to be used in the conversation cell.
-(Class)classForIdentifier:(NSString )identifier
fromMessageParts:(NSArray
)messageParts
withMessagePartViewFactories:(NSDictionary *)messagePartViewFactories
Retrieves the class associated to the current identifier
in order to be registered to be used in the conversation cell.

ICConversationCategoryViewController

The ICConversationCategoryViewController displays a list of conversation categories.

Categories are represented by ICConversationCategory instances, these instances may be nested to create a hierarchy of categories. The view controller displays one level of categories at a time when the user taps a category the fragment with either:

(a) Where the category has sub-categories, displays the list of sub-categories
(b) Where the category does not have sub-categories, raise an event via the

Properties:

categoriesNSMutableArrayThe categories that isdisplayed to the user while creating a new conversation
delegateidThe ICConversationCateogryViewController delegate

Interaction

The view controller displays a single level of categories at a time, if a category is selected which has sub-categories then the sub-category list replaces that which is currently shown. Pressing the back button will navigate up one level in the hierarchy.

When a final selection is made the selection is raised as an event through the ICConversationCategoryViewControllerDelegate. A final selection is determined as a category that has no sub-categories.

ICConversationCategoryViewControllerDelegate

Methods:

SyntaxDescription
-(void)conversationCategoryViewController:
(ICConversationCategoryViewController )conversationCategoryViewController didSelectConversationCategory:(ICConversationCategory )conversationCategory parentCategory:(ICConversationCategory *)parentCategory
Invoked when a final category selection is made.

ICConversationCategory

Organisations typically have multiple contact points to which a customer may be directed depending on their query. Conversation categories provide the means to drive users to the correct contact point.

The information contained in a ICConversationCategory instance is also used to establish the correct communication stream for a conversation. Within IMIconnect, real-time messages are sent over a stream, the stream is used to direct messages to the correct service to process the message.

Properties:

titleNSStringThe title of the category.
streamNameNSStringThe stream name of the category.
imageUIImageThe image of the category.
subCategoriesNSMutableArraythe sub categories.

Methods:

SyntaxDescription
-(instancetype)initWithTitle:(NSString )title streamName:(NSString )streamNameInstantiates an ICConversationCategory instance with a title and a streamName
-(instancetype)initWithTitle:(NSString )title streamName:(NSString )streamName image:(UIImage *)imageInstantiates an ICConversationCategory instance with a title, a streamName and an image
-(instancetype)initWithTitle:(NSString )title streamName:(NSString )streamName image:(UIImage )image subCategories:(NSMutableArray )subCategoriesInstantiates an ICConversationCategory instance with a title, a streamName, an image and subcategories

ICCustomerDetails

Certain integrations, such as IMIchat, allow customer details to be sent to the agent serving customer requests. This class encapsulates that information.

Properties:

firstNameNSStringThe customer's first name
lastNameNSStringThe customer's last name
emailNSStringThe customer's email
phoneNumberNSStringThe customer's phone number

Methods:

SyntaxDescription
-(instancetype)initWithDictionary:(NSDictionary *)dictionaryInstantiates an ICCustomerDetails with a dictionary
-(NSDictionary *)dictionaryRetrieves a dictionary from the customer details object

ICConversationDetails

The ICConversationDetails Contains data relating to a conversation.

Certain integrations, such as IMIchat, require certain information about a conversation to be transmitted to the customer service agent. This class holds this data.

Properties:

threadICThreadThe conversation’s thread
customerDetailsICCustomerDetailsThe conversation’s customer details
categoryNSStringThe conversation’s category
subCategoryNSStringThe conversation’s subcategory

Methods:

SyntaxDescription
-(NSDictionary *)dictionaryParses the ICConversationDetails to a dictionary.
-(void)enrich:(ICMessage *)messageEnriches a message instance with the customer details.

ICMessagePartContainerView

The ICMessagePartContainerView Contains all the part views that represent the content of an ICMessageData instance.

Properties:

messagePartViewsNSMutableArrayThe array of all the part views that are contained by the container view.

Methods:

SyntaxDescription
-(void)addPartView:(ICMessagePartView *)partViewAdds a part view to the container view
-(void)resizeConstraints:(CGSize)sizeResizes the container’s layout constraints
-(void)setMessageData:(id)messageData withMessageParts:(NSArray *)messagePartsAssociates a message and its message parts with the container view.

ICMessagePartView

This is an abstract that represents a message part. This class can represent a text or an attachment for example.

Properties:

delegateidSee ICMessagePartViewDelegate description
messagePartidThe message part associated to the view
messageDataIdThe message data associated to the view

Methods:

SyntaxDescription
-(void)setMessagePart:(id)messagePart withMessageData:(id)messageDataAssociates a message and its message part with the part view

ICMessagePartViewDelegate

Methods:

SyntaxDescription
-(CGSize)messagePartView:(I*CMessagePartView )messagePartView sizeForMessagePart:(id)messagePartProvides the size for a message part.
-(void)messagePartView:(ICMessagePartView *)messagePartView didUpdateHeight:(CGFloat)heightInforms when the height has changed.
-(void)messagePartView:(ICMessagePartView *)messagePartView didRemoveMessagePart:(id)messagePartInforms when a message part has been removed.

ICMessagePartViewDataSource

Methods:

-(void)resizeInContainerSize:(CGSize)containerSizeResizes the message part view

ICMessagePartViewFactory

This interface represents all the methods needed to create the part views that will be displayed in either an inbox cell or a conversation cell

-(NSString *)contentTypeIndicates the type of the message part handled by the factory.
-(ICMessagePartView *)createMessagePartViewCreates a new ICMessagePartView depending on the content type of the message part.

ICAudioPartViewFactory

This class implements the ICMessagePartViewFactory and is responsible for the create of the ICAudioPartView

ICFilePartViewFactory

This class implements the ICMessagePartViewFactory and is responsible for the create of the ICFilePartView

ICImagePartViewFactory

This class implements the ICMessagePartViewFactory and is responsible for the create of the ICImagePartView

ICVideoPartViewFactory

This class implements the ICMessagePartViewFactory and is responsible for the create of the ICVideoPartView

ICTextPartView

This component displays a text from a message

Properties:

textColorUIColorThe text part view’s text color
fontUIFontThe text part view’s font

ICURLPartView

This component displays a URL preview from a message

ICMediaPartView

This component displays an attachment from a message.

Properties:

mediaDelegateidSee ICMediaPartViewDelegate description
mediaTapGestureRecognizerUITapGestureRecognizerThe tap gesture recognizer that will be trigger when a user clicks on a media part view

Methods:

  • (void)displayDownloadView:(BOOL)shouldDisplayView

Displays/Hides the download view

  • (void)startDownload

Starts downloading a file attached to a media

  • (void)downloadWillStart

Tells the subclass that the download will start

  • (void)downloadDidEnd

Tells the subclass that the download will start

  • (void)showProcessIndicator:(BOOL)isProcessing
Shows/Hides the process indicator

ICAudioPartView

This component displays an audio attachment from a message.

Properties

durationTextColorUIColorThe duration text color
durationFontUIFontThe duration font

ICFilePartView

This component displays a file attachment from a message.

Properties:

fileTextColorUIColorThe file text color
fileFontUIFontThe file font

ICImagePartView

This component displays an image attachment from a message.

ICLocationPartView

This component displays a location attachment from a message.

ICVideoPartView

This component displays a video attachment from a message.

Properties:

durationTextColorUIColorThe duration text color
durationFontUIFontThe duration font
stateBackgroundColorUIColorThe state background color

ICConnectionStatusView

The view is displayed to show the current connection status with the message broker.
3 statuses can be displayed: “Connected.”, “Connecting…” and “Disconnected.”

Properties:

disconnectedBackgroundColorUIColorThe disconnected background color
disconnectedTextColorUIColorThe disconnected text color
connectingBackgroundColorUIColorThe connecting background color
connectingTextColorUIColorThe connecting text color
connectedBackgroundColorUIColorThe connected background color
connectedTextColorUIColorThe connected text color
connectionStatusICConnectionStatusThe current connection status

ICConversationButton

This button allows the user to open a new conversation screen. Some features will be added to that component in the future.

Properties:

buttonBackgroundColorUIColorThe conversation’s button background color
buttonTintColorUIColorThe conversation’s tint background color
buttonTextColorUIColorThe conversation’s text background color
buttonCornerRadiusCGFloatThe conversation’s corner radius

ICMessagePart

This interface represents a part of the message that the developer wants to display in a partial view.

Properties:

contentTypeNSStringThe message part content type

ICTextMessagePart

This class will retrieve all the text that will be displayed for a specific message.

Properties:

textNSStringThe message text

ICAttachmentMessagePart

This class will retrieve a single attachment that will be displayed for a specific message.

Properties:

filePathNSURLThe file path where the message is locally stored
attachmentICAttachmentThe attachment that should be displayed in the message part view

ICURLMessagePart

This class will retrieve a URL from which a preview will be displayed for a specific message

Properties:

urlNSURLThe URL that will be represented in the message part view

ICMessageComposerView

This view represents the composer to write down some messages and add some
attachments to these messages. To add some attachments to the message some
plugins must be registered. These plugins will allow the user to pick some
photos/videos, share a location or record some audio message for example.

Properties:

delegateidSee ICMessageComposerViewDelegate description
composerTextViewICMessageComposerTextViewSee ICMessageComposerTextView description
borderWidthCGFloatThe border width
borderColorUIColorThe border color
cornerRadiusCGFloatThe corner radius
backgroundColorUIColorThe background color
composerBackgroundColorUIColorThe composer background color

Methods:

Syntax

Description

  • (void)registerPlugins:(NSArray *)plugins

Registers an array of plugins

  • (void)registerPlugin:(ICMessageComposerPlugin *)plugin
Registers a plugin

ICMessageComposerViewDelegate

This interface will warn the delegate each time an action has been made on the
composer.

Methods:

Syntax

Description

  • (void)didComposeMessage:(ICMessage )message withMessageParts:(NSArray )messageParts

Tells the delegate that a message has been composed and provides the eventual message parts attached to that message

  • (void)presentPluginOptionsInAlertController:(UIAlertController *)alertController

Tells the delegate to present an alertController containing plugin options

  • (void)didSelectPlugin:(ICMessageComposerPlugin *)plugin

Tells the delegate that a plugin has been selected by the user

  • (void)messageComposerView:(ICMessageComposerView *)messageComposerView
    didUpdateHeight:(CGFloat)height

Tells the delegate that the message composer view has updated its height

  • (void)messageComposerViewDidStartTyping:(ICMessageComposerView *)messageComposerView

Tells the delegate that the user is typing

  • (void)messageComposerViewDidStopTyping:(ICMessageComposerView *)messageComposerView
Tells the delegate that the user is not typing anymore

ICMessageComposerTextView

This class represents the part of the composer when the user types some text.

Properties:

composerTextDelegateidSee ICMessageComposerTextViewDelegate description
messageTextColorUIColorThe message text color
messageFontUIFontThe message text font size
placeHolderTextNSStringThe place holder text
placeHolderTextColorUIColorThe place holder text color

Methods:

Syntax

Description

  • (void)clear
Clears the composer text view and show the place holder

ICMessageComposerPlugin

This abstract class represents a way to add an attachment to a message. It can
be a photo picker, an audio recorder etc,

Properties:

titleNSStringThe plugin title

Methods:

Syntax

Description

  • (void)addMessagePart:(id)messagePart
    withThumbnail:(UIImage *)thumbnail

This method should be called when a message part has been selected and his associated thumbnail generated

  • (instancetype)pluginWithTitle:(NSString *)title

Instantiates a plugin

  • (void)presentFromViewController:(UIViewController *)viewController

Shows the graphic component associated to the plugin from a view controller

  • (void)addMessagePart:(id)messagePart toMessage:(ICMessage *)message
Associates a message part to a message when the user has clicked on the Send button

ICMessageComposerAudioPlugin

This class represents a way to transform a recorded audio to an audio attachment

ICMessageComposerAudioPluginViewController

This class provides an easy way to record an audio

Properties:

delegateIdSee the ICMessageComposerAudioPluginViewControllerDelegate description

ICMessageComposerAudioPluginViewController

Methods:

Syntax

Description

  • (void)audioPluginViewController:(ICMessageComposerAudioPluginViewController )audioPluginViewController didFinishRecordingAudioAtURL:(NSURL )url withDuration:(CGFloat)duration
Tells the delegate that the audio has finished being recorded

ICMessageComposerLocationPlugin

This class represents a way to transform a selected location to a location
attachment

ICMessageComposerLocationPluginViewController

This class provides an easy way to pick a location

Properties:

delegateIdSee the ICMessageComposerLocationPluginViewControllerDelegate description

ICMessageComposerLocationPluginViewControllerDelegate

Methods:

  • (void)locationPluginViewController:(ICMessageComposerLocationPluginViewController )locationPluginViewController didFinishPickingLocation:(CLLocation )location :(NSString *)address inRegion:(MKCoordinateRegion)region
Tells the delegate that the user has picked a location

ICMessageComposerFilePlugin

This class represents a way to transform a selected file to a file attachment

ICMessageComposerImagePlugin

This class represents a way to transform a selected image to an image attachment

Properties:

sourceTypeUIImagePickerControllerSourceTypeThe source type of the image. It can be the library or directly the camera

ICImageViewController

This class provides a way to show an image in full screen

Properties:

ImageUIImageThe image that will be displayed in full screen

ICFileViewController

This class displays a preview of a file

Methods:

Syntax

Description

  • (void)showFilePreview:(NSURL *)filePath
Shows a file preview from a file path

ICMediaHandler

Handles an interaction with a media with a default behaviour

Methods:

  • (instancetype)shared

Gives a single instance of an ICMediaHandler

  • (void)handleMediaMessagePart:(ICMediaMessagePart )mediaMessagePart fromViewController:(UIViewController )viewController
Handles a media message part with a default behaviour

Copyright © 2000 - 2021 IMImobile Limited | All Rights Reserved