iOS Core SDK
This interface has two classes that handles the SDK initialization and registration. The classes are:
- IMIconnect
- ICButton
- ICGenericTemplateElement
- ICGenericTemplateElement
- ICQuickReplyData
- ICDeviceProfile
- ICConfig
- ICLogger
- ICInAppNotificationManager
- ICInAppNotificationThemeStyle
- ICInAppNotificationViewStyle
- ICInAppModalNotificationViewStyle
- ICInAppBannerNotificationViewStyle
- ICInAppNotificationButtonStyle
- ICInAppNotificationViewBinder
- ICInAppNotificationViewBinderFactory
- ICInAppBannerNotificationViewBinder
- ICInAppBannerNotificationViewBinderFactory
- ICInAppModalNotificationViewBinder
- ICInAppModalNotificationViewBinderFactory
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
- startupWithConfig
- startupWithLaunchOptions
- startupWithLaunchOptions(with config)
- shutdown
- registerWithDeviceProfile
- deviceProfile
- updateDeviceProfileParam
- removeDeviceProfileParam
- unregister
- setPolicyPollingInterval
- isRegistered
- policyPollingInterval
- sdkVersion
- setSecurityToken
- setSecurityTokenErrorDelegate
- publishEvent
startup
This method initializes the SDK, reading configuration from the configuration file (IMIconnect.plist
).
Syntax: + (BOOL)startup:(NSError **)error;
Parameters:
Parameter | Type | Description |
---|---|---|
error | NSError | Specifies 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:
Parameter | Type | Description |
---|---|---|
config | ICConfig | The config object containing the appId and the clientKey. |
error | NSError | Specifies 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:
Parameter | Type | Description |
---|---|---|
launchOptions | NSDictionary | The launch options passed from didFinishLaunching method. |
error | NSError | Specifies 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:
Parameter | Type | Description |
---|---|---|
launchOptions | NSDictionary | The launch options passed from didFinishLaunching method. |
config | ICConfig | The config object containing the appId and the clientKey. |
error | NSError | Specifies 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 Type | Method |
---|---|
void | shouldEnableMethodSwizzling:(BOOL)shouldEnable |
Syntax: `IMIconnect shouldEnableMethodSwizzling:BOOL value``
Parameters:
Parameter | Type | Description |
---|---|---|
shouldEnable | Bool | YES 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 Type | Method |
---|---|
void | shouldEnableNotificationCenterDelegateSwizzling :(BOOL)shouldEnable |
Syntax: IMIconnect shouldEnableNotificationCenterDelegateSwizzling: BOOL value
Parameters:
Parameter | Type | Description |
---|---|---|
shouldEnable | Bool | YES 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:
Parameter | Type | Description |
---|---|---|
interval | NSTimeInterval | Specifies 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 Method | Description |
---|---|---|
+(NSString *)deviceId | +(ICDeviceProfile *)deviceProfile | Retrieves 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:
Parameter | Type | Description |
---|---|---|
token | String | Specifies 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:
Parameter | Type | Description |
---|---|---|
eventParams | NSDictionary | The eventParams for custom params which needs to be published |
completionHandler | void (^)(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.
Property | Description |
---|---|
@property (nonatomic, readonly) ICInteractiveDataType type | The type of the Interactive data |
@property (nonatomic, readonly) NSString *identifier | The ID of the button |
@property (nonatomic) NSString *actionURL | The url that can be used to open web_link and deeplink |
@property (nonatomic) NSString *imageURL | The image URL that can be used to render the image of the button |
@property (nonatomic) NSString *title | The title of the button |
@property (nonatomic) NSMutableDictionary *payLoad | The 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;
Parameter | Type | Description |
---|---|---|
dictionary | NSDictionary | The 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.
Property | Description |
---|---|
@property (nonatomic, readonly) NSString * title | The title of the generic template element |
@property (nonatomic) NSString * subTitle | The subTitle of the generic template element |
@property (nonatomic) NSArray _imageURLs | The array of image urls |
@property (nonatomic) NSArray _buttons | The array of template buttons |
ICGenericTemplateAttachment
This class exposes the data related to generic template attachment.
Property | Description |
---|---|
@property (nonatomic) NSArray _elements | The template elements |
@property (nonatomic) NSString *reference | The reference of the TemplateAttachment |
ICQuickReplyData
This class exposes the data related to quick reply data.
Property | Description |
---|---|
@property (nonatomic) NSMutableArray<ICButton_> _buttons | The quick replies that have been attached to the message |
@property (nonatomic) NSString *reference | The 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.
Property | Description |
---|---|
@property (nonatomic) NSString *deviceId | Device ID |
@property (nonatomic) NSString *appUserId | App user ID |
@property (nonatomic) BOOL isAppUserIdSystemGenerated | Indicates if the app user ID has been generated by the system |
@property (nonatomic) NSString *customerId | Customer ID |
@property (nonatomic) BOOL isGuest; | Returns true if the device is registering or registered as a guest, otherwise false. |
Methods | Description |
---|---|
(instancetype)initWithDeviceId:(NSString *)deviceId | Instantiates an ICDeviceProfile with a deviceId |
(instancetype)initWithDeviceId:(NSString _) deviceId appUserId:(NSString _)appUserId | Instantiates an ICDeviceProfile with a deviceId and an appUserId |
(NSString *)defaultDeviceId | Retrieves 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.
Property | Description |
---|---|
@property (nonatomic, readonly) NSString *appId | Specifies the app id of the app created in Webex Connect. |
@property (nonatomic, readonly) NSString *clientKey | Specifies the client key of the app created in Webex Connect. |
@property (nonatomic, readonly) NSString *groupIdentifier | The app group identifier. This group identifier is used to retrieve information between the CoreSDK and the NotificationServiceExtension. |
@property (nonatomic, readonly) NSString *serverDomain | Specifies server domain configuration to override zero-rating domain. |
@property (nonatomic, readonly) NSString *environment | Specifies 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;
Parameter | Type | Description |
---|---|---|
appId | NSString | Specifies the app id that is created in Webex Connect |
clientKey | NSString | Specifies the client key that is created in Webex Connect |
environment | ICEnvironment | Specifies 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;
Parameter | Type | Description |
---|---|---|
appId | NSString | Specifies the app id that is created in Webex Connect |
clientKey | NSString | Specifies the client key that is created in Webex Connect |
groupIdentifier | NSString | Specifies the app group identifier associated to the app |
serverDomain | NSString | Specifies server domain to override zero-rating domain |
environment | ICEnvironment | Specifies the server environment in which app is created. |
Methods
- initWithAppId:withAppId:clientkey
- initWithAppId:withAppId:clientkey:groupIdentifier
- initWithAppId:withAppId:clientkey:serverDomain
- initWithAppId:withAppId:clientkey:groupIdentifier:serverDomain
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:
Parameter | Type | Description |
---|---|---|
appId | NSString | Specifies the app id that is created in Webex Connect |
clientKey | NSString | Specifies 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:
Parameter | Type | Description |
---|---|---|
appId | NSString | Specifies the app id that is created in Webex Connect |
clientKey | NSString | Specifies the client key that is created in Webex Connect |
groupIdentifier | NSString | Specifies 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:
Parameter | Type | Description |
---|---|---|
appId | NSString | Specifies the app id that is created in Webex Connect |
clientKey | NSString | Specifies the client key that is created in Webex Connect |
serverDomain | NSString | Specifies 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:
Parameter | Type | Description |
---|---|---|
appId | NSString | Specifies the app id that is created in Webex Connect |
clientKey | NSString | Specifies the client key that is created in Webex Connect |
groupIdentifier | NSString | Specifies the app group identifier associated to the app |
serverDomain | NSString | Specifies 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:
Parameter | Type | Description |
---|---|---|
shouldRequestNotificationPermission | BOOL | Set 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:
Property | Description |
---|---|
@property (nonatomic, readonly) BOOL | shouldRequestNotificationPermission; 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:
Parameter | Type | Description |
---|---|---|
logType | ICLogType | The type of logs that will be logged. |
target | ICLogTarget | The 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:
Parameter | Type | Description |
---|---|---|
days | Integer | The 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:
Parameters | Type | Description |
---|---|---|
enable | Boolean | A 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:
Parameters | Type | Description |
---|---|---|
notificationFactory | ICInAppNotificationViewBinderFactory | An instance of ICInAppNotificationViewBinderFactory through which user has to pass the view binder factory details to register for notifications with the specified type. |
notificationType | User 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:
Parameters | Type | Description |
---|---|---|
viewStyle | ICInAppModalNotificationViewStyle | An 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:
Parameters | Type | Description |
---|---|---|
viewStyle | ICInAppBannerNotificationViewStyle | An 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:
Parameters | Type | Description |
---|---|---|
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:
Parameters | Type | Description |
---|---|---|
bannerNotificaitonTheme | User 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
Property | Description |
---|---|
@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.
Property | Description |
---|---|
@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.
Property | Description |
---|---|
@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
Property | Description |
---|---|
@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
Property | Description |
---|---|
@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
Method | Description |
---|---|
(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”.
Method | Description |
---|---|
(NSString *)notificationType; | It returns the content type of the message part handled by the factory. (example: “BasicNotification”, “BasicAlert”, “RichAlert”) |
(ICInAppNotificationViewBinder *)createNotificationView | It 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:
Parameter | Type | Description |
---|---|---|
environment | NSString | server environment string |
Returns: Return ICEnvironment enum.
Updated about 1 year ago