Enumerations

The following enumerations are used in imiconnect iOS SDK.

ICLogType

This enumeration exposes enumeration data with the type of logs that will be logged.

ValueDescription
ICLogTypeNoneNo log will be displayed/recorded.
ICLogTypeDebugA large number of logs will be logged that can help to debug.
ICLogTypeProductionLogs will be kept at a minimum level.

ICLogTarget

This enumeration represents the target on which the logs will be displayed or recorded.

ValueDescription
ICLogTargetConsoleLogs will be displayed in the console.
ICLogTargetFileLogs will be recorded in a file.

ICConnectionStatus

This enumeration describes different connection status between the SDK and the Real-Time Messaging server.

ValueDescription
ICConnectionStatusNoneNo connection attempt has been made.
ICConnectionStatusConnectingThe SDK is attempting to establish a connection with the Real-Time Messaging server.
ICConnectionStatusConnectedThe SDK is connected and allows you to publish and receive messages.
ICConnectionStatusRefusedThe connection is refused by the Real-Time Messaging server.
ICConnectionStatusClosedThe SDK is disconnected from the Real-Time Messaging server.
ICConnectionStatusErrorA connection error has occurred while connecting to the Real-Time Messaging server.

ICErrorCode

This enumeration describes different error codes of the SDK.

ValueDescription
ICErrorCodeNotInitializedReturned when trying to access a feature without initializing the SDK.
ICErrorCodeAlreadyInitializedReturned when trying to initialize the SDK when it is already initialized.
ICErrorCodeNotRegisteredReturned when trying to access a feature without registering a user.
ICErrorCodeFeatureNotSupportedReturned when trying to access a feature that is not supported by the app.
ICErrorCodeInvalidParameterValueReturned when a required parameter is not passed or an invalid value has been passed to a method.
ICErrorCodeNotConnectedReturned when trying to communicate with the RTM server without establishing a connection.
ICErrorCodeRegistrationFailureReturned when registration is failed.
ICErrorCodeInvalidResponseReturned when a response from the server is invalid.
ICErrorCodeTokenInvalid = 38The token is not in the expected format.
ICErrorCodeTokenUnauthorized = 39The token does not provide authorization to access the requested resource.
ICErrorCodeTokenExpired = 40The token has expired.
ICErrorCodeTokenRequired = 41The token is required.

ICMessageChannel

This enumeration describes the supported message channels.

ValueDescription
ICMessageChannelPushThe incoming message comes from the Push notification channel.
ICMessageChannelRealTimeThe incoming message comes from Real Time Messaging channel.

ICMessageType

This enumeration describes the message types.

ValueDescription
ICMessageTypeBasicA standard non-interactive message.
ICMessageTypeInteractiveA message that contains pre-built out-of-the-box interactive elements. This type of message typically causes actions to occur on the device in response to notification buttons.
ICMessageTypeAlertMessage data is alert from connect platform.
ICMessageTypeDeliveryReceiptMessage data is a DeliveryReceipt, TransactionId is available and can be used to match the receipt to the original message.
ICMessageTypeMessageStandard Push or Live Chat / In-App Messaging.
ICMessageTypeNotificationRepresents the notification part of an Live Chat / In-App Messaging.
ICMessageTypeReadReceiptMessage data is a ReadReceipt, only TransactionId is available and can be used to match the receipt to the original message.
ICMessageTypeRepublishThe message is a republish of a MO, all data from the original message is available.
ICMessageTypeTypingStartMessage data is a TypingStart from the connect platform end.
ICMessageTypeTypingStopMessage data is a TypingStop from the connect platform end.
ICMessageTypeClickedReceiptMessage data is a ClickedReceipt from the connect platform end.

📘

Note

Message field could be null for below message types:

  • ICMessageTypeDeliveryReceipt
  • ICMessageTypeReadReceipt
  • ICMessageTypeTypingStart
  • ICMessageTypeTypingStop

ICThreadType

ValueDescription
ICThreadTypeConversationThe thread is a conversation, the users can send messages on this thread.
ICThreadTypeAnnouncementThe thread is an announcement thread, the users can only receive messages on this thread.

ICMessageSynchronizationMode

ValueDescription
ICMessageSynchronizationModeFullSynchronization should synchronize all available data.
ICMessageSynchronizationModeLimitedSynchronization should occur based on policy limits.
ICMessageSynchronizationModeNoneSynchronization should be disabled.

ICMessageStatus

ValueDescription
ICMessageStatusNoneNone is the default message status.
ICMessageStatusSentMessage sent successfully to connect the platform.
ICMessageStatusDeliveredMessage delivered to the user device.
ICMessageStatusReadThe message read by the user device.

ICThreadstatus

ValueDescription
ICThreadStatusActiveThe thread is active. The user can receive (and send if the thread type is a conversation) messages on this thread
ICThreadStatusClosedThe thread is closed. The user cannot receive (and send if the thread type is a conversation) any messages on this thread

iOS SDK Single Binary Changes

The section below describes the changes to convert the SDK to Single Binary which supports all the current environments.

ICEnvironment

This version of SDK has a new enum ICEnvironment

ValueDescription
ICEnvironmentUKIt denotes the UK server environment
ICEnvironmentUSIt denotes the US server environment
ICEnvironmentCAIt denotes the CANADA server environment
ICEnvironmentINIt denotes the INDIA server environment
ICEnvironmentTCIt denotes the TELECITY server environment
ICEnvironmentAZURE_USIt denotes the AZURE US server environment
ICEnvironmentLDNIt denotes the LONDON server environment

ICInteractiveDataType

This enumeration describes the Interactive data type for message.

ValueDescription
ICInteractiveDataTypeFormResponseIt denotes the form response for message type “form”
ICInteractiveDataTypeWebURLIt denotes the response for “weburl” interactive data
ICInteractiveDataTypeTemplatePostbackIt denotes the response for “postback” Template interactive data
ICInteractiveDataTypeQuickReplyPostbackIt denotes the response for “postback” quick reply interactive data

Form Template Message Type Changes

The following new enumerations added in this version of SDK.

ICFormFieldType

This enumeration describes the supported Form Fields.

ValueDescription
ICFormFieldTypeTextIt denotes the Text type form field
ICFormFieldTypeNameIt denotes the Name type form field
ICFormFieldTypeEmailIt denotes the Email type form field
ICFormFieldTypeIntegerIt denotes the Integer type form field
ICFormFieldTypeDecimalIt denotes the Decimal type form field
ICFormFieldTypeDateIt denotes the Date type form field
ICFormFieldTypeDropdownIt denotes the Dropdown type form field
typedef enum
{
ICFormFieldTypeText,
ICFormFieldTypeName,
ICFormFieldTypeEmail,
ICFormFieldTypeInteger,
ICFormFieldTypeDecimal,
ICFormFieldTypeDate,
ICFormFieldTypeDropdown,
ICFormFieldTypeMultiSelectDropdown
} ICFormFieldType;

ICTemplateType

This enumeration describes the supported Template Types.

ValueDescription
ICInteractiveDataTypeFormResponseIt denotes the Form Response type Interactive data
ICTemplateTypeGenericIt denotes the Generic type Interactive data

Classes

The following new classes added in this version of SDK.

ICTemplateAttachment

This class exposes the data related to a Template Attachment.

Methods:

typeFromString:typeString:

This method Converts the Field Type String to ICTemplateType.

Syntax: + (ICTemplateType)typeFromString:(NSString *)typeString;

Parameters:

ParameterTypeDescription
typeStringNSStringSpecifies the template type

Return Value: Returns the ICTemplateType value equals to typeString passed to this method.

Sample Code:

ICTemplateType templateType  = [ICTemplateAttachment typeFromString:@”form”];

stringFromType:type:

This method Converts the ICTemplateType to String.

Syntax: + (NSString *)stringFromType:( ICTemplateType)type;

ParameterTypeDescription
typeICTemplateTypeSpecifies the template type

Return Value: Returns the string value equals to ICTemplateType passed to this method.

Sample Code:

NSString *templateType  = [ICTemplateAttachment stringFromType: ICTemplateTypeForm];

ICFormTemplateAttachment

This class exposes the data related to a Form Template.

Properties:

PropertyDescription
@property (nonatomic) NSString *formTitle;The Form Title
@property (nonatomic) NSArray *formFields;The Form Fields