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 Extender Service
  • Inbox View
  • Chat
  • Stories
  • Deep Links
  • Troubleshooting
  • Upgrading
  • Changelog

Cordova SDK

  • Capacitor Setup
  • Cordova Setup
  • Methods
  • Changelog

React Native SDK

  • Setup
  • Methods
  • Changelog

Xamarin SDK

  • Setup
  • Methods
  • Changelog

Flutter SDK

  • Setup
  • Methods
  • Chat
  • Troubleshooting
  • Changelog

Inbox View

CleverPush Inbox View

You can also implement CleverPush InboxView into your application. Inbox View will come up with the package of the all the notification you have recieved with the CleverPush. To use the InboxView you will need to use the sample code as described below.

Objective-C:

  1. Import "CleverPush/CPInboxView.h":
  2. Add the inbox view:
#import <CleverPush/CPInboxView.h>

CPInboxView *inboxView = [[CPInboxView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)
                                              combine_with_api:YES
                                                    read_color:UIColor.whiteColor
                                                  unread_color:UIColor.lightGrayColor
                                       notification_text_color:UIColor.blackColor
                                 notification_text_font_family:@"AppleSDGothicNeo-Reguler"
                                        notification_text_size:17
                                               date_text_color:UIColor.blackColor
                                         date_text_font_family:@"AppleSDGothicNeo-Reguler"
                                                date_text_size:12
                                                divider_colour:UIColor.blackColor];
    [self.view addSubview:inboxView];

Swift:

  1. Import CleverPush
  2. Add the inbox view:
import CleverPush

        let inboxView = CPInboxView(frame: CGRect(x: 0.0, y: 0, width: self.view.frame.size.width, height: self.view.frame.height ),
                                    combine_with_api: true,
                                    read_color: UIColor.white,
                                    unread_color: UIColor.lightGray,
                                    notification_text_color: UIColor.black,
                                    notification_text_font_family: "AppleSDGothicNeo-Reguler",
                                    notification_text_size: 17,
                                    date_text_color: UIColor.black,
                                    date_text_font_family: "AppleSDGothicNeo-Bold",
                                    date_text_size: 12,
                                    divider_colour: UIColor.black)

self.view.addSubview(inboxView!)

and you can get the call back events when you tapped on the any of the index from the list.

[inboxView notificationClickCallback:^(CPNotification *result) {
        NSLog(@"%@", result);
 }];
inboxView?.notificationClickCallback({ result in
            print(result as Any)
})

Here is how the InboxView will looks.

SS

← MethodsChat →
  • CleverPush Inbox View
SDKs
JavaScriptiOSAndroidCordovaCapacitorReact NativeXamarinFlutter
Community
TwitterFacebookGitHub
More
API ReferenceAPI OverviewBlogImprintPrivacy PolicyTerms of serviceGDPR
Copyright © 2023 CleverPush