Chat APIs and In-app Messaging SDKs for Developers

Applozic provides Chat APIs and In-app Messaging SDKs for Android, iOS and Web apps to power cross-device, multi-platform rich messaging.
Find comprehensive guides and platform-specific Chat API documentation to get started with In-app Messaging.

Get Started    

iOS (ApplozicSwift)

iOS Chat UI Customization

Our SDK come with a pre-built UI that you can use to integrate with your application. Following is a list of things that you can customize in the pre-built UI.

Create ALKConfiguration object to customise appearance of our UI.
You can create a static ALKConfiguration instance in AppDelegate.swift file

/// Add this in your AppDelegate.swift file 
static let applozicConfiguration: ALKConfiguration = {
      var config = ALKConfiguration()
      /// Change properties here... 
      /// Read below to know about different properties used in `ALKConfiguration`
      return config
}()

After this you can use above applozicConfiguration object when you are launching chat screens.

While creating applozicConfiguration in AppDelegate, you can change various properties description of which is given below.

Disable group detail screen

If true then tapping on navigation bar in conversation view will open the group detail screen.
If false then tapping on navigation bar in conversation view will do nothing.
DEFAULT: true
NOTE: Only works in case of groups.

config.isTapOnNavigationBarEnabled = false

Disable user profile tap action

If true, then tapping on user's profile icon in group chat will open a thread with that user.
If false, then tapping on user's profile icon in group chat will do nothing.
DEFAULT: true
NOTE: You will see the previous messages(if there are any).

config.isProfileTapActionEnabled = true

Change background color of chat detail screen

Use below code to change background color for chat detail screen.
DEFAULT: Color hex :: 0xf9f9f9

config.backgroundColor = UIColor.red

Show bottom line of navigation bar

Below code hides/shows the bottom line in the navigation bar.
If true, it will hide bottom line of navigation bar.
If false, bottom line of navigation bar will be visible.
DEFAULT: true
NOTE: It will be reflected in all the ViewControllers where navigation bar is visible.

config.hideNavigationBarBottomLine = true

Change navigation bar background color.

Use below code to change navigation bar's background color.
DEFAULT: UIColor.navigationOceanBlue()
NOTE: It will be used in all the ViewControllers where navigation bar is visible.

config.navigationBarBackgroundColor = UIColor.red

Change navigation bar tint color

Use below code to change navigation bar's tint color.
DEFAULT: UIColor.navigationTextOceanBlue
NOTE: It will be used in all the ViewControllers where navigation bar is visible.

config.navigationBarItemColor = UIColor.red

Change navigation bar title color.

Use below code to change navigation bar's title color.
DEFAULT: UIColor.black.
NOTE: It will be used in all the ViewControllers where navigation bar is visible.

config.navigationBarTitleColor = UIColor.white

Change status bar style

Use below code to change status bar style. It will be used in all view controllers.
DEFAULT: UIStatusBarStyle.lightContent.

config.statusBarStyle = UIStatusBarStyle.default

Customize ChatBar

Below are the different options you can choose with chat bar.

Change ChatBar bottomView color

Use below code to change ChatBar's bottom view color. This is the view which contains all the attachment and other options.
DEFAULT: UIColor.background(.grayEF)

config.chatBarAttachmentViewBackgroundColor = UIColor.lightGray

Hide media options from ChatBar

Use below code to change visibility of all the media options in Chat bar.
If true, then all the options will be hidden.
If false, then all the options will be visible.
DEFAULT: false

config.hideAllOptionsInChatBar = true

Hide mic button from ChatBar

Use below code to change visibility of mic button in chat bar.
If true, then mic button will be hidden in chatBar.
If false, then mic button will be visible in chatBar.
DEFAULT: false

config.hideAudioOptionInChatBar = true

Hide line between send button and textView in ChatBar

Use below code to change visibility of line between send button and textView in chatbar.
If true then line between send button and text view will be hidden.
If false then line between send button and text view will be visibl.
DEFAULT: false

config.hideLineImageFromChatBar = true

Change send message icon in chatBar.

Use below code to change send message icon in chatBar.
DEFAULT: send icon in ApplozicSwift asset.

config.sendMessageIcon = UIImage(named: "YOUR_IMAGE_NAME", in: Bundle.main, compatibleWith: nil)

Use Localization

You can localize the strings used in ApplozicSwift SDK by creating localizable strings file with all the keys. For more details check Localization section for ApplozicSwift.
If you are creating localizable file with a custom name then you need to pass the file name here.
DEFAULT: Localizable

config.localizedStringFileName = "YOUR_FILE_NAME"

Change navigationBar right item in chat detail screen.

Use below code to customize navigation bar right item in chat detail screen.
You can show image in that bar item, or hide it completely or use some other system icon.
DEFAULT: UIBarButtonItem.SystemItem.refresh

/// If you want to show image
config.rightNavBarImageForConversationView = UIImage(named: "YOUR_IMAGE_NAME", in: Bundle.main, compatibleWith: nil)

/// If you want to use system icon.
config.rightNavBarSystemIconForConversationView = UIBarButtonItem.SystemItem.add

/// If you want to hide the bar item.
config.hideRightNavBarButtonForConversationView = true

Customize navigation bar items in chat-list.

Below are the different options you can choose with navigation bar items in chat list screen.

Hide back button from chat list.

Use below code to hide back navigation icon in chat list screen.
If true, back button will be hidden.
If false, back button will be visible.
DEFAULT: false

config.hideBackButtonInConversationList = true

Hide navigation bar right item in chat list screen

Use below code to change visibility of start new chat button in navigation bar of chat list screen.
If true then the start new chat button will be hidden.
If false then the start new chat button will be visible.
DEFAULT: false

config.hideStartChatButton = false

Change navigation bar right item image in chat list screen.

Use below code to show custom image in navigation bar right side item in chat list screen.
By default, create group icon image will be used.
DEFAULT: fill_214 icon in ApplozicSwift asset

config.rightNavBarImageForConversationListView = UIImage(named: "YOUR_IMAGE_NAME", in: Bundle.main, compatibleWith: nil)

Handle tap action of navigation bar right item in chat list screen

Use below code to handle click action on navigation bar right side item outside.
DEFAULT: It will open screen to start new chat.

config.handleNavIconClickOnConversationListView = false
config.nsNotificationNameForNavIconClick = "NOTIFICATION_NAME_TO_HANDLE_CLICK"

Change typing indicator name

Use below code to change name used in typing indicator.
If true, it will show user name in typing status. Eg. User is typing
If false, it will show "Someone" in typing status. Eg. Someone is typing
DEFAULT: true

config.showNameWhenUserTypesInGroup = true

Hide start new conversation button in empty chat list

Use below code to change visibility of start new conversation button in chat list screen when there is no chat.
If true then start new conversation button shown in the empty state will be hidden.
If false then start new conversation button shown in the empty state will be visible.
DEFAULT: false

config.hideEmptyStateStartNewButtonInConversationList = true

Customize Date/Information cell.

Use below code to customize colors for date and information cell.

Date cell and information cell Background color

It will change the background color for date/information cell.
DEFAULT: UIColor.gray

config.conversationViewCustomCellBackgroundColor = UIColor.red

Date cell and information cell text color

It will change the text color for date/information cell.
DEFAULT: UIColor.white

config.conversationViewCustomCellTextColor = UIColor.red

Add metadata while sending messages.

This is used to add additional information whenever a message is sent. This information will be passed in message's metadata field.

var messageMetadata = [AnyHashable : Any]()
messageMetadata["customKey"] = "customValue"
config.messageMetadata = messageMetadata

Add metadata when suggested replies is selected.

This is used to send additional information as metadata when a suggested reply is selected. Message's metadata will contain this key along with the value that will be present in the json. For more information for this use-case check our RichMessage section.

config.quickReplyMetadataKey = "SUGGESTED_REPLY_KEY"

Disable Rich Message action.

Use below code to disable click action on all rich messages.
If true then action will be disabled.
If false then action will be enabled.
DEFAULT: false

config.disableRichMessageButtonAction = true

Show Info option in group detail screen.

Use the below code to show info option in the action sheet when a user is selected in group detail screen.
If true then info option will be visible.
If false then info option will be hidden.
DEFAULT: false

Now, when this info option is selected, a notification will be posted with the name "UserInfoSelected" with object containing 3 values :

  1. "Id": userId of user
  2. "Name": display name of user
  3. "Controller": reference to the top view controller.
config.showInfoOptionInGroupDetail = true

iOS (ApplozicSwift)


iOS Chat UI Customization

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.