iOS Core SDK

This interface has two classes that handles the SDK initialization and registration. The classes are:

IMIconnect

This class contains the methods to initialize the SDK and register a user. When integrating the SDK into your app, it is mandatory to use this class to initialize the SDK. With the exception of the Authentication module, it is also necessary to register a user before other features are used.

startup

This method initializes the SDK, reading configuration from the configuration file (IMIconnect.plist).

  Syntax: + (BOOL)startup:(NSError **)error;

  Parameters:

ParameterTypeDescription
errorNSErrorSpecifies the error description. The error will be set if a startup fails.

Return Value: YES if the startup succeeds, else NO

startupWithConfig

This method initializes the SDK using the passed configuration.

  Syntax: + (BOOL)startupWithConfig:(ICConfig *)config error:(NSError **)error;

  Parameters:

ParameterTypeDescription
configICConfigThe config object containing the appId and the clientKey.
errorNSErrorSpecifies the error description. The error will be set if a startup fails.

  Return Value: YES if the startup succeeds, else NO

startupWithLaunchOptions

This method initializes the SDK using the passed configuration options. An error can be passed in parameters, which will be set if something goes wrong during the startup process. This method is mandatory if IMIconnectConfiguration.plist is not used.

  Syntax: + (BOOL)startupWithLaunchOptions:(NSDictionary *)launchOptions error:(NSError **)error

  Parameters:

ParameterTypeDescription
launchOptionsNSDictionaryThe launch options passed from didFinishLaunching method.
errorNSErrorSpecifies the error description. The error will be set if a startup fails.

  Return Value: YES if the startup succeeds, else NO

The default delegate method is (**BOOL**)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions.

startupWithLaunchOptions (with config)

This method initializes the SDK using the passed configuration options. An error can be passed in parameters, which will be set if something goes wrong during the startup process. This method is mandatory if IMIconnectConfiguration.plist is not used.

  Syntax: + (BOOL)startupWithLaunchOptions:(NSDictionary *)launchOptions withConfig:(ICConfig *)config error:(NSError **)error

  Parameters:

ParameterTypeDescription
launchOptionsNSDictionaryThe launch options passed from didFinishLaunching method.
configICConfigThe config object containing the appId and the clientKey.
errorNSErrorSpecifies the error description. The error will be set if a startup fails.

The default delegate method is (**BOOL**)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions.

isStarted

This method is used check if the SDK is started.

  Syntax: + (BOOL)isStarted;

shouldEnableMethodSwizzling

This method enables/disables method swizzling for application life cycle methods and remote notifications methods based on shouldEnable parameter value.

  Method + (void)shouldEnableMethodSwizzling:(BOOL)shouldEnable;

Return TypeMethod
voidshouldEnableMethodSwizzling:(BOOL)shouldEnable

  Syntax: `IMIconnect shouldEnableMethodSwizzling:BOOL value``

  Parameters:

ParameterTypeDescription
shouldEnableBoolYES for enabling and NO for disabling
[IMIconnect shouldEnableMethodSwizzling:YES];
[IMIconnect shouldEnableMethodSwizzling:NO];

shouldEnableNotificationCenterDelegateSwizzling

This method Sets User Notification Center Delegate in IMI SDK based on shouldEnable parameter value. By default this will be set to TRUE and sets the User Notification Center Delegate.

  Method: + (void) shouldEnableNotificationCenterDelegateSwizzling: (BOOL)shouldEnable;

Return TypeMethod
voidshouldEnableNotificationCenterDelegateSwizzling
:(BOOL)shouldEnable

  Syntax: IMIconnect shouldEnableNotificationCenterDelegateSwizzling: BOOL value

  Parameters:

ParameterTypeDescription
shouldEnableBoolYES for enabling and NO for disabling
[IMIconnect shouldEnableNotificationCenterDelegateSwizzling: YES];
[IMIconnect shouldEnableNotificationCenterDelegateSwizzling: NO];

shutdown

This method is used to clean up the SDK, freeing all internal object instances. Invoking this method will stop the SDK features from functioning as such Real-Time Messages and Push notifications.

📘

Usage of this method is not required unless there are a few limited cases where you may wish to use it; for example, if you are only using the Authentication or Monitoring features.

registerWithDeviceProfile

This method registers the device profile with the SDK. This method causes profile details to be sent to the Webex Connect platform. Once a profile is registered, all further SDK calls take place in the context of that profile.

Syntax: (void)registerWithDeviceProfile:(ICDeviceProfile *)deviceProfile completionHandler:(void (^)(NSDictionary *response,NSError *error))completionHandler

ICDeviceProfile *deviceProfile = [[ICDeviceProfile alloc]
initWithDeviceId: [ICDeviceProfile defaultDeviceID]];
[IMIconnect registerWithDeviceProfile:deviceProfile
completionHandler:^(NSDictionary*response, NSError *error)
{
		//Handle the response
}];

deviceProfile

This method retrieves the currently registered device profile.

  Syntax: + (ICDeviceProfile *)deviceProfile

isRegistered

This method is used to check whether the user is currently registered with Webex Connect. This method returns _true _if the user is registered, else _false _is returned.

  Syntax: + (BOOL)isRegistered;

setPolicyPollingInterval

This method is used to set the interval at which the SDK will poll policy updates in minutes. To prevent adverse effects on battery or CPU usage a minimum interval of 30 minutes is enforced. To disable polling, set the value to 0. If Real-Time Messaging or Push is enabled, this value will not be used.

  Syntax: +(void)setPolicyPollingInterval:(NSTimeInterval)interval;

  Parameters:

ParameterTypeDescription
intervalNSTimeIntervalSpecifies the time in minutes after which policy updates will happen.

policyPollingInterval

This method is used to get the current policy polling interval, in minutes.

  Syntax: +(NSTimeInterval)policyPollingInterval;

updateDeviceProfileParam

This method updates the device profile parameter identified by ICDeviceProfileParam with a new value.

  Syntax: + (void)updateDeviceProfileParam:(ICDeviceProfileParam)deviceProfileParam withValue:(NSString *)value completionHandler:(void (^)(NSDictionary *response,NSError *error))completionHandler

[IMIconnect updateDeviceProfileParam:ICDeviceProfileParamCustomerId 

                                           withValue:_userIdTextField.text 

                                   completionHandler:^(NSDictionary *response, NSError *error) 

                 { 

                     //Handle response 

                 }];

deviceProfile

This method retrieves the deviceId used by Webex Connect APIs.

  Syntax: + (ICDeviceProfile *)deviceProfile

Method (Deprecated)New MethodDescription
  +(NSString *)deviceId  +(ICDeviceProfile *)deviceProfileRetrieves the deviceId used by Webex Connect APIs.

removeDeviceProfileParam

This method removes the device profile parameter identified by ICDeviceProfileParam with a new value.

  Syntax: + (void)removeDeviceProfileParam:(ICDeviceProfileParam)completionHandler:(void (^)(NSDictionary *response,NSError *error))completionHandler

[IMIconnect removeDeviceProfileParam:ICDeviceProfileParamUserId
									completionHandler:^(NSDictionary *response, NSError *error)
{
	//Handle the response
}];

unregister

This method unregisters the current device profile.

  Syntax: + (void)unregister:(void (^)(NSError *error))completionHandler

sdkVersion

This method retrieves the SDK version number.

  Syntax: + (NSString *)sdkVersion;

  Return Value: Returns the SDK version number.

setSecurityToken

This method is used to set security token to provide better access control for user-centric resources. This method allows developers to specify the Security Token that the SDK will pass to the Gateway API calls.

  Syntax: + (void)setSecurityToken:(NSString *)token;

  Parameters:

ParameterTypeDescription
tokenStringSpecifies the token which is generated from jwttoken API.

  Example:

[IMIconnect setSecurityToken:token];

setSecurityTokenErrorDelegate

This method allows developers to register an object which implements the SecurityTokenExceptionListener interface to listen for Security Token related exceptions which occur from internal (indirect) Gateway API calls.

  Syntax:
+ (void)setSecurityTokenErrorDelegate(id<ICSecurityTokenErrorDelegate>)delegate;

  Example:

[IMIconnect setSecurityTokenErrorDelegate:self];

publishEvent

This method publishes your custom events info to the Webex Connect platform.

  Syntax:
+ (void)publishEventParam:(NSDictionary *)eventParams completionHandler:(void (^)(NSDictionary *response, NSError *error))completionHandler

  Parameters:

ParameterTypeDescription
eventParamsNSDictionaryThe eventParams for custom params which needs to be published
completionHandlervoid (^)(NSDictionary response, NSError error)A completionHandler that will be called when a response from the server is received

  Example:

NSDictionary *eventParams = [NSDictionary new];
    [eventParams setValue:@"9123443212" forKey:@"number"];
    [eventParams setValue:@"234642" forKey:@"OTP"];
    
    [IMIconnect publishEventParam:eventParams completionHandler:^(NSDictionary *response, NSError *error)
    {
        if(error != nil)
        {
            NSLog(@"Publish failed, error: %@", error.localizedDescription);
            return;
        }
        
        NSLog(@"Published successfully");
    }];

ICButton

This class exposes the data related to interactive button in quick replies and generic templates.

PropertyDescription
@property (nonatomic, readonly) ICInteractiveDataType typeThe type of the Interactive data
@property (nonatomic, readonly) NSString *identifierThe ID of the button
@property (nonatomic) NSString *actionURLThe url that can be used to open web_link and deeplink
@property (nonatomic) NSString *imageURLThe image URL that can be used to render the image of the button
@property (nonatomic) NSString *titleThe title of the button
@property (nonatomic) NSMutableDictionary *payLoadThe payload of the button

This method Creates an instance of an ICButton based on a dictionary.

Methods: initWithAppId:clientKey:environment

This method is used to initialize an ICConfig instance with an appId, clientkey and environment.

Syntax: -(instancetype)initWithAppId:(NSString *)appId clientKey:(NSString *)clientKey environment:(ICEnvironment)environment;

ParameterTypeDescription
dictionaryNSDictionaryThe dictionary from which an ICButton is created

Return Value: Returns the ICButton instance which is been created with the dictionary passed.

Sample Code: ICButton *quickReply = [[ICButton alloc] initWithDictionary:[ NSDictionary new]];

ICGenericTemplateElement

This class exposes the data related to generic template element.

PropertyDescription
@property (nonatomic, readonly) NSString * titleThe title of the generic template element
@property (nonatomic) NSString * subTitleThe subTitle of the generic template element
@property (nonatomic) NSArray _imageURLsThe array of image urls
@property (nonatomic) NSArray _buttonsThe array of template buttons

ICGenericTemplateAttachment

This class exposes the data related to generic template attachment.

PropertyDescription
@property (nonatomic) NSArray _elementsThe template elements
@property (nonatomic) NSString *referenceThe reference of the TemplateAttachment

ICQuickReplyData

This class exposes the data related to quick reply data.

PropertyDescription
@property (nonatomic) NSMutableArray<ICButton_> _buttonsThe quick replies that have been attached to the message
@property (nonatomic) NSString *referenceThe reference of the QuickReply Data

ICDeviceProfile

ICDeviceProfile is a class that gathers information about the back-end device profile. An ICDeviceProfile instance should be instantiated to register a device profile.
The developer can choose to register the device profile with a deviceId only or with a deviceId and an appUserId. User can generate a unique/own device ID or can choose the defaultDeviceId provided by the SDK.
If the user chooses to register a device profile with the deviceId only, the backend will automatically generate an appUserId. The current device profile is accessible via the Webex Connect class.

PropertyDescription
@property (nonatomic) NSString *deviceIdDevice ID
@property (nonatomic) NSString *appUserIdApp user ID
@property (nonatomic) BOOL isAppUserIdSystemGeneratedIndicates if the app user ID has been generated by the system
@property (nonatomic) NSString *customerIdCustomer ID
@property (nonatomic) BOOL isGuest;Returns true if the device is registering or registered as a guest, otherwise false.
MethodsDescription
(instancetype)initWithDeviceId:(NSString *)deviceIdInstantiates an ICDeviceProfile with a deviceId
(instancetype)initWithDeviceId:(NSString _)

deviceId appUserId:(NSString _)appUserId
Instantiates an ICDeviceProfile with a deviceId and an appUserId
(NSString *)defaultDeviceIdRetrieves the default device ID based on the vendor ID of the device
(instancetype)initWithDeviceId:(NSString )deviceId appUserId:(NSString )appUserId isGuest:(BOOL)isGuest;Instantiates an ICDeviceProfile with a deviceId, an appUserId and isGuest.

ICConfig

This class holds the configuration information that is used to initialize the SDK.

PropertyDescription
@property (nonatomic, readonly) NSString *appIdSpecifies the app id of the app created in Webex Connect.
@property (nonatomic, readonly) NSString *clientKeySpecifies the client key of the app created in Webex Connect.
@property (nonatomic, readonly) NSString *groupIdentifierThe app group identifier. This group identifier is used to retrieve information between the CoreSDK and the NotificationServiceExtension.
@property (nonatomic, readonly) NSString *serverDomainSpecifies server domain configuration to override zero-rating domain.
@property (nonatomic, readonly) NSString *environmentSpecifies the server environment string.

Methods: initWithAppId:clientKey:environment

This method is used to initialize an ICConfig instance with an appId, clientkey and environment.

Syntax: -(instancetype)initWithAppId:(NSString *)appId clientKey:(NSString *)clientKey environment:(ICEnvironment)environment;

ParameterTypeDescription
appIdNSStringSpecifies the app id that is created in Webex Connect
clientKeyNSStringSpecifies the client key that is created in Webex Connect
environmentICEnvironmentSpecifies the server environment in which app is created.

Returns: An instance of ICConfig.

initWithAppId:clientkey:groupidentifier:serverDomain:environment

This method is used to initialize an ICConfig instance with an appId, clientkey, groupIdentifier, serverDomain and environment

Syntax: -(instancetype)initWithAppId:(NSString *)appId clientKey:(NSString *)clientKey groupIdentifier:(NSString *)groupIdentifier serverDomain:(NSString *)serverDomain environment:(ICEnvironment)environment;

ParameterTypeDescription
appIdNSStringSpecifies the app id that is created in Webex Connect
clientKeyNSStringSpecifies the client key that is created in Webex Connect
groupIdentifierNSStringSpecifies the app group identifier associated to the app
serverDomainNSStringSpecifies server domain to override zero-rating domain
environmentICEnvironmentSpecifies the server environment in which app is created.

Methods

initWithAppId:withAppId:clientkey

This method is used to initialize an ICConfig instance with an appId and clientkey.

Syntax: - (instancetype)initWithAppId:(NSString *)appId clientKey:(NSString *)clientKey;

Parameters:

ParameterTypeDescription
appIdNSStringSpecifies the app id that is created in Webex Connect
clientKeyNSStringSpecifies the client key that is created in Webex Connect

Returns:

An instance of ICConfig.

initWithAppId:withAppId:clientkey:groupIdentifier

This method is used to initialize an ICConfig instance with an appId, clientkey and groupIdentifier.

Syntax - initWithAppId:(NSString *)appId clientKey:(NSString *)clientKey groupIdentifier:(NSString *)groupIdentifier;

Parameters:

ParameterTypeDescription
appIdNSStringSpecifies the app id that is created in Webex Connect
clientKeyNSStringSpecifies the client key that is created in Webex Connect
groupIdentifierNSStringSpecifies the app group identifier associated to the app

Returns:

An instance of ICConfig.

initWithAppId:withAppId:clientkey:serverDomain

This method is used to initialize an ICConfig instance with an appId, clientkey, and serverDomain.

Syntax - (instancetype)initWithAppId:(NSString *)appId clientKey:(NSString *)clientKey serverDomain:(NSString *)serverDomain;

Parameters:

ParameterTypeDescription
appIdNSStringSpecifies the app id that is created in Webex Connect
clientKeyNSStringSpecifies the client key that is created in Webex Connect
serverDomainNSStringSpecifies server domain to override zero-rating domain

Returns:

An instance of ICConfig.

initWithAppId:withAppId:clientkey:groupIdentifier:serverDomain

This method is used to initialize an ICConfig instance with an appId, clientkey, groupIdentifier, and serverDomain.

Syntax - initWithAppId:(NSString *)appId clientKey:(NSString *)clientKey groupIdentifier:(NSString *)groupIdentifier serverDomain:(NSString *)serverDomain;

Parameters:

ParameterTypeDescription
appIdNSStringSpecifies the app id that is created in Webex Connect
clientKeyNSStringSpecifies the client key that is created in Webex Connect
groupIdentifierNSStringSpecifies the app group identifier associated to the app
serverDomainNSStringSpecifies server domain to override zero-rating domain

Returns:An instance of ICConfig.

setShouldRequestNotificationPermissionOnRegistration

This method Enables push notification request on registration based on shouldRequestNotificationPermission parameter value. By default push notification request on registration is enabled.

Parameters:

ParameterTypeDescription
shouldRequestNotificationPermissionBOOLSet NO to disable and YES to enable push notification request on registration

Syntax: - (void)setShouldRequestNotificationPermissionOnRegistration(BOOL)shouldRequestNotificationPermission;

Sample Code:

ICConfig \*config = \[[ICConfig alloc] initWithAppId:@"testAppId" clientKey:@"testClientKey" serverDomain:nil];

[config setShouldRequestNotificationPermission:YES];

Properties:

PropertyDescription
@property (nonatomic, readonly) BOOLshouldRequestNotificationPermission; Attribute to allow the sdk to request for remote notifications

ICLogger

Methods

setLogType

This method sets the log options for the logger.

  Syntax: + (void)setLogType:(ICLogType)logType forLogTarget:(ICLogTarget)logTarget

  Parameters:

ParameterTypeDescription
logTypeICLogTypeThe type of logs that will be logged.
targetICLogTargetThe target on which the logs will be displayed/recorded.

setRetentionDuration

This method sets the retention duration of the logs. The logs will be kept during that duration and will be automatically purged after.

  Syntax: + (void)setRetentionDuration:(NSInteger)days

  Parameters:

ParameterTypeDescription
daysIntegerThe number of days after which the logs will be purged.

logPath

This method retrieves the directory path where the logs are stored.

  Syntax: + (NSString *)logPath

  Return Value: Returns the directory path where the logs are stored.

ICInAppNotificationManager

setEnable

This method can be used to enable the notification display when app is in active state.

  Syntax: - (void)setEnable:(BOOL)enable;

  Parameters:

ParametersTypeDescription
enableBooleanA boolean value which will be used to enable/disable the InApp Notifications.

  Example:

[[ICInAppNotificationManager shared] setEnable:YES];

registerViewFactory

This method can be used to register the view factory for notification types like Modal and Banner.

  Syntax: - (void)registerViewFactory:(id<ICInAppNotificationViewBinderFactory>)notificationFactory forNotificationType:(ICInAppNotificationType)notificationType

  Parameters:

ParametersTypeDescription
notificationFactoryICInAppNotificationViewBinderFactoryAn instance of ICInAppNotificationViewBinderFactory through which user has to pass the view binder factory details to register for notifications with the specified type.
notificationTypeUser can register for banner type notifications by passing ICInAppNotificationTypeBanner to this parameter and to register for modal type notifications he should pass ICInAppNotificationTypeModal to this parameter.

  Example:

[[ICInAppNotificationManager shared] registerViewFactory:[ICInAppBannerNotificationViewBinderFactory new] forNotificationType:ICInAppNotificationTypeBanner];
    [[ICInAppNotificationManager shared] registerViewFactory:[ICInAppModalNotificationViewBinderFactory new] forNotificationType:(ICInAppNotificationType)ICInAppNotificationTypeModal];

setModalNotificationViewStyle

This method can be used to set the Modal notifications view style.

  Syntax: - - (void)setModalNotificationViewStyle:(ICInAppModalNotificationViewStyle *)viewStyle;

  Parameters:

ParametersTypeDescription
viewStyleICInAppModalNotificationViewStyleAn instance of ICInAppModalNotificationViewStyle class through which user has to set up the required styles like color, font using the attributes defined in the class.

  Example:

ICInAppModalNotificationViewStyle *modalViewStyle = [[ICInAppModalNotificationViewStyle alloc] init];
modalViewStyle.titleTextColor = [UIColor blackColor];    modalViewStyle.titleTextFont = [UIFont systemFontOfSize:15.0f];
modalViewStyle.backGroundColor = [UIColor whiteColor];    [[ICInAppNotificationManager shared] setModalNotificationViewStyle:modalViewStyle];

setBannerNotificationViewStyle

This method can be used to set the Banner notifications view style.

  Syntax: - (void)setBannerNotificationViewStyle:(ICInAppBannerNotificationViewStyle *)viewStyle;

  Parameters:

ParametersTypeDescription
viewStyleICInAppBannerNotificationViewStyleAn instance of ICInAppBannerNotificationViewStyle class through which user has to set up the required styles like color, font using the attributes defined in the class.

  Example:

ICInAppBannerNotificationViewStyle *bannerViewStyle = [[ICInAppBannerNotificationViewStyle alloc] init];
    bannerViewStyle.titleTextColor = [UIColor blackColor];
    bannerViewStyle.titleTextFont = [UIFont systemFontOfSize:15.0f];
    bannerViewStyle.backGroundColor = [UIColor whiteColor];
    bannerViewStyle.closeButtonTintColor = [UIColor redColor];
    ICInAppNotificationButtonStyle *buttonStyle = [[ICInAppNotificationButtonStyle alloc] init];
    buttonStyle.buttonTextColor = [UIColor blueColor];
    buttonStyle.buttonBackgroundColor = [UIColor grayColor];
    bannerViewStyle.buttonStyle = buttonStyle;
    [[ICInAppNotificationManager shared] setBannerNotificationViewStyle:bannerViewStyle];

setModelNotificationViewTheme

This method can be used to set the Model notifications view theme (Light or Dark).

  Syntax: - - (void)setModalNotificationViewTheme:(ICInAppModalNotificationTheme)modalNotificaitonTheme;

  Parameters:

ParametersTypeDescription
modalNotificaitonTheme- User can set the modal notification theme as Dark theme by passing the ICInAppModalNotificationThemeDark to this parameter and user has to pass ICInAppModalNotificationThemeLight to set light theme.

  Example:

[[ICInAppNotificationManager shared] setModalNotificationViewTheme:ICInAppModalNotificationThemeDark];

setBannerNotificationViewTheme

This method can be used to set the Banner notifications view theme (Light or Dark).

  Syntax: - (void)setBannerNotificationViewTheme:(ICInAppBannerNotificationTheme)bannerNotificaitonTheme;

  Parameters:

ParametersTypeDescription
bannerNotificaitonThemeUser can set the banner notification theme as Dark theme by passing the ICInAppBannerNotificationThemeDark to this parameter and user has to pass ICInAppBannerNotificationThemeLight to set light theme.

  Example:

[[ICInAppNotificationManager shared] setBannerNotificationViewTheme:ICInAppBannerNotificationThemeLight];

ICInAppNotificationThemeStyle

This class holds the Theme styles of InApp Notifications and it will be used to render the theme styles selected by the user.

Properties

PropertyDescription
@property (nonatomic) ICInAppBannerNotificationTheme notificationBannerTheme;InApp Notification Banner type theme such as Light/Dark.
@property (nonatomic) ICInAppModalNotificationTheme notificationModalTheme;InApp Notification Modal type theme such as Light/Dark.

ICInAppNotificationViewStyle

This class holds the View styles of InApp Notifications and it will be used to render the view styles selected by the user.

Properties

Below properties are available for both Modal and Banner Notifications.

PropertyDescription
@property (nonatomic, readwrite) UIColor *titleTextColor;This property can be used to set the text color for the InApp Notification title.
@property (nonatomic, readwrite) UIFont *titleTextFont;This property can be used to set the text Font for InApp Notification title.
@property (nonatomic, readwrite) UIColor *titleTextShadowColor;This property can be used to set the text-shadow color for the InApp Notification title.
@property (nonatomic, readwrite) UIColor *textColor;This property can be used to set the text color for InApp Notification details(Body message).
@property (nonatomic, readwrite) UIFont *textFont;This property can be used to set the text Font for InApp Notification details(Body message).
@property (nonatomic, readwrite) UIColor *textShadowColor;This property can be used to set the text Shadow color for InApp Notification details(Body message).
@property (nonatomic, readwrite) UIColor *backGroundColor;This property can be used to set the background color for the InApp Notification view.
@property (nonatomic, readwrite) ICInAppNotificationButtonStyle *buttonStyle;This property can be used to set the Buttons Style for InApp Notification buttons.

ICInAppModalNotificationViewStyle

This class has been derived from ICInAppNotificationViewStyle, so that it can access all the properties from the ICInAppNotificationViewStyle class. We haven’t added any properties to this class as all the required attributes have been declared in the superclass.

ICInAppBannerNotificationViewStyle

This class has been derived from ICInAppNotificationViewStyle, so that it can access all the properties from the ICInAppNotificationViewStyle class. We haven’t added any properties to this class as all the required attributes have been declared in the superclass.

PropertyDescription
@property (nonatomic, readwrite) UIColor *closeButtonTintColor;Banner Notification Close Button Tint Color
@property (nonatomic, readwrite) UIColor *closeButtonBackgroundColor;Banner Notification Close Button Background Color
@property (nonatomic, readwrite) UIImage *closeButtonImage;Banner Notification Close Button Image

ICInAppNotificationButtonStyle

This class holds the styling attributes of InApp Notification Buttons. Users can set attributes like tint color, background color to the InApp Notification buttons.

Properties

PropertyDescription
@property (nonatomic) UIColor *buttonTextColor;This property can be used to set the text color for Buttons.
@property (nonatomic) UIColor *buttonTintColor;This property can be used to set the tint color for Buttons.
@property (nonatomic) UIButtonType buttonType;This property can be used to set the button type for Buttons.
@property (nonatomic) UIColor *buttonBackgroundColor;This property can be used to set the Background color for Buttons.

ICInAppNotificationViewBinder

This class holds the InApp notification’s message object and view styles. These properties will be used to render the notifications UI.

Properties

PropertyDescription
@property (nonatomic, retain)ICMessage *message;This property holds the notification message object which contains complete information like title, details, attachments, and actions.
@property (nonatomic)ICInAppBannerNotificationViewStyle *bannerViewStyle;This property is responsible for the banner type InApp Notification view style which will be used to render the UI as specified by the user.
@property (nonatomic)ICInAppModalNotificationViewStyle *modalViewStyle;This property is responsible for modal type InApp Notification view style which will be used to render the UI as specified by the user.

Methods

MethodDescription
(void)bindMessage:(ICMessage *)message;This function binds the message data to the notification view. It holds the business logic of data rendering.
(UIViewController *)getView;
(void)bindModalViewStyle:(ICInAppModalNotificationViewStyle *)modalViewStyle;This function binds the modal notification’s view style to the notification view.
(void)bindBannerViewStyle:(ICInAppBannerNotificationViewStyle *)bannerViewStyle;This function binds the banner notification’s view style to the notification view.

ICInAppNotificationViewBinderFactory

This class acts as a base binder factory class for Modal and Banner notification’s binder factory classes. Below are the functions declared under a protocol named “ICInAppNotificationViewBinderFactory”.

MethodDescription
(NSString *)notificationType;It returns the content type of the message part handled by the factory. (example: “BasicNotification”, “BasicAlert”, “RichAlert”)
(ICInAppNotificationViewBinder *)createNotificationViewIt returns an instance of the Notification view binder. It can be a banner view binder or modal view binder.

ICInAppBannerNotificationViewBinder

This class has been inherited from “ICInAppNotificationViewBinder“. This class holds the banner notification UI rendering. It holds all the business logic(action handlers of notifications) and UI logic (attachments and actions rendering) to adopt for the different resolutions and orientations.

ICInAppBannerNotificationViewBinderFactory

This class confirms to “ICInAppNotificationViewBinderFactory” and implements the required methods of this protocol. This class is responsible to create view binder for Banner type when a banner notification received.

ICInAppModalNotificationViewBinder

This class has been inherited from “ICInAppNotificationViewBinder“. This class holds the modal notification UI rendering. It holds all the business logic(action handlers of notifications) and UI logic (attachments and actions rendering) to adopt for the different resolutions and orientations.

ICInAppModalNotificationViewBinderFactory

This class confirms to “ICInAppNotificationViewBinderFactory” and implements the required methods of this protocol. This class is responsible to create view binder for Modal type when a modal type notification received.

ICServerEnvironment

This class has the utility methods to get string from ICEnvironment enum and vice-versa.

Methods: getEnumFromString

This methods returns the ICEnvironment from given string

Syntax: + (ICEnvironment)getEnumFromString:(NSString *)environment;

Parameters:

ParameterTypeDescription
environmentNSStringserver environment string

Returns: Return ICEnvironment enum.