CleverPush Developer Docs

CleverPush Developer Docs

  • SDK Docs
  • API Overview
  • API Reference

›iOS SDK

JavaScript SDK

  • Setup
  • Methods

iOS SDK

  • Setup
  • Methods
  • Inbox View
  • Chat
  • Stories
  • Deep Links
  • Live Activities
  • Troubleshooting
  • Changelog

Android SDK

  • Setup
  • Methods
  • Notification Service Extension
  • Inbox View
  • Chat
  • Stories
  • Deep Links
  • Troubleshooting
  • Upgrading
  • Geo Fence Location Permission
  • Changelog

Capacitor SDK

  • Setup
  • Methods
  • Changelog

Cordova SDK

  • Setup
  • Methods
  • Changelog

React Native SDK

  • Setup
  • Methods
  • Changelog

Xamarin SDK

  • Setup
  • Methods
  • Changelog

Flutter SDK

  • Setup
  • Methods
  • Chat
  • Stories
  • Troubleshooting
  • Changelog

Expo SDK

  • Setup
  • Methods
  • Changelog

Chat

CleverPush Chat View

Swift
Objective-C
import CleverPush

let chatView = CPChatView(frame: CGRect(x: 0, y: 0, width: self.view.frame.size.width, height: self.view.frame.size.height))
self.view.addSubview(chatView)
#import <CleverPush/CPChatView.h>

CPChatView *chatView = [[CPChatView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
[self.view addSubview:chatView];

Handle opened URLs:

Objective-C
CPChatView *chatView = [[CPChatView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height) urlOpenedCallback:^(NSURL *url) {
// do something with the opened URL
} subscribeCallback:^() {
// user has subscribed via Chat
}];

// Colors can be modified:
chatView.chatInputContainerBackgroundColor = [UIColor redColor];
chatView.chatInputBackgroundColor = [UIColor redColor];
chatView.chatInputTextColor = [UIColor redColor];
chatView.chatSenderBubbleTextColor = [UIColor redColor];
chatView.chatReceiverBubbleBackgroundColor = [UIColor redColor];
chatView.chatReceiverBubbleTextColor = [UIColor redColor];
chatView.chatSendButtonBackgroundColor = [UIColor redColor];
chatView.chatTimestampTextColor = [UIColor redColor];

You can also load or lock the chat, pass custom header HTML, and register the view with the SDK.

Swift
Objective-C
let chatView = CPChatView(
frame: CGRect(x: 0, y: 0, width: self.view.frame.size.width, height: self.view.frame.size.height),
urlOpenedCallback: { url in
print(url as Any)
},
subscribeCallback: {
print("User subscribed via Chat")
},
headerCodes: "<style></style>"
)

CleverPush.addChatView(chatView)
chatView.loadChat()
chatView.loadChat(withSubscriptionId: "SUBSCRIPTION_ID")
chatView.lockChat()
CPChatView *chatView = [[CPChatView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)
urlOpenedCallback:^(NSURL *url) {
NSLog(@"%@", url);
} subscribeCallback:^{
NSLog(@"User subscribed via Chat");
} headerCodes:@"<style></style>"];

[CleverPush addChatView:chatView];
[chatView loadChat];
[chatView loadChatWithSubscriptionId:@"SUBSCRIPTION_ID"];
[chatView lockChat];
← Inbox ViewStories →
  • CleverPush Chat View
SDKs
JavaScriptiOSAndroidCordovaCapacitorReact NativeXamarinExpoFlutter
Community
TwitterFacebookGitHub
More
API ReferenceAPI OverviewBlogImprintPrivacy PolicyTerms of serviceGDPR
Copyright © 2026 CleverPush