Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Channel iOS SDK

The Channel iOS SDK make is easy to integreate in-app messaging into your iOS app.


Our SDK is compatible with iOS apps supporting iOS 8.0 and above.

Install the SDK

  1. Go to our Github releases page and download and upzip
  2. In Xcode, with your project open, click on "File" then "Add files to Project...".
  3. Select Channel.framework in the directory you just unzipped.
  4. Checked "Copy items if needed".
  5. Click "Add".
  6. In "Embedded Binaries" Click "+"
  7. Select Channel.framework.
  8. Create a new Run Script Phase in your app’s target's Build Phases and paste the following snippet in the script text field.

This step is required to work around an App Store submission bug when archiving universal binaries.

  1. Add NSPhotoLibraryUsageDescription and NSCameraUsageDescription to a info.plist file.

Configure the SDK

Once you downloaded the SDK, configure it with your Channel Application ID.



#import "AppDelegate.h"
#import <Channel/Channel.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [Channel setupWithApplicationId:@"app_VJSiM8Eq9FvnkdH1YBJ9_823TzGbzI5UOuiHbw6BANk"];
    // do any other necessary launch configuration

    return YES;


import UIKit
import Channel

class AppDelegate: UIResponder, UIApplicationDelegate {

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        Channel.setup(withApplicationId: "app_VJSiM8Eq9FvnkdH1YBJ9_823TzGbzI5UOuiHbw6BANk")
        // do any other necessary launch configuration

        return true

More methods in setting up.

Some app might want to enable Channel only for authroized user. If you already have your UserID and other userData. Channel also provides these helper methods

+ (void)setupWithApplicationId:(NSString* _Nonnull)appId;
+ (void)setupWithApplicationId:(NSString* _Nonnull)appId userID:(NSString* _Nullable)userID userData:(NSDictionary* _Nullable)userData;
+ (void)setupWithApplicationId:(NSString* _Nonnull)appId launchOptions:(NSDictionary* _Nullable)launchOptions;
+ (void)setupWithApplicationId:(NSString* _Nonnull)appId userID:(NSString* _Nullable)userID userData:(NSDictionary* _Nullable)userData launchOptions:(NSDictionary* _Nullable)launchOptions;;
open class func setup(withApplicationId appId: String)
open class func setup(withApplicationId appId: String, userID: String?, userData: [AnyHashable : Any]?)
open class func setup(withApplicationId appId: String, launchOptions: [AnyHashable : Any]? = nil)
open class func setup(withApplicationId appId: String, userID: String?, userData: [AnyHashable : Any]?, launchOptions: [AnyHashable : Any]? = nil)


Channel provides a view controller that encapsulate all the functionalities.

You can send userID and UserData (optional) to Channel backend to help you identify which user you are communicating with. The data will show up in user side bar.

- (IBAction)didTapButton:(id)sender {
    NSString* userID = @"AnyID";
    NSDictionary* userData = @{@"name":@"John",
        @"lastname": @"Doe"};
    UIViewController* vc = [Channel chatViewControllerWithUserID:userID userData:userData];
    vc.title = @"Your title here";
    UINavigationController* nav = [[UINavigationController alloc]initWithRootViewController:vc];
    [self presentViewController:nav animated:YES completion:nil];
   @IBAction func didTapButton(_ sender: Any) {
        let userID = "AnyID"
        let userData = ["screen":"help",
        let vc = Channel.chatViewController(withUserID: userID, userData: userData)
        vc.title = "Your title"
        self.navigationController?.pushViewController(vc, animated: true)

Checking new message

Sometimes you want to notify a client when you sent some message from our backend.


 [Channel checkNewMessages:^(NSInteger numberOfNewMessages) {
        if (numberOfNewMessages > 0){
            NSString* title = [NSString stringWithFormat:@"You have new %ld messages",numberOfNewMessages];
            UIAlertController* alert = [UIAlertController alertControllerWithTitle:title message:nil preferredStyle:UIAlertControllerStyleAlert];
            UIAlertAction* view = [UIAlertAction actionWithTitle:@"View" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
                //open chat view 
            [alert addAction:view];
            UIAlertAction* later = [UIAlertAction actionWithTitle:@"Later" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
            [alert addAction:later];
            [self presentViewController:alert animated:YES completion:nil];


Channel.checkNewMessages { (numberOfNewMessages) in
            if numberOfNewMessages > 0 {
                let alert = UIAlertController(title: "", message: "You have \(numberOfNewMessages) new mesage", preferredStyle: .alert)
                let viewAction = UIAlertAction(title: "View", style: .default, handler: { (_) in
                   //do something or open Channel chat view controller
                let cancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: { (_) in
                self.present(alert, animated: true, completion: nil)

In-app notification

This method allows you to check if there is new in-app notification to the client.


[[Channel shared] showLatestNotification];




ChannelDelegate There are delegates methods for in-app notification.


@protocol ChannelDelegate <NSObject>

- (void)channelUserDidTapButtonNotificationView:(CHNotification* _Nonnull)notification button:(CHNotificationButton* _Nonnull)button;
- (void)channelUserDidTapPushNotificationTypeConversations;
- (void)channelUserDidTapPushNotificationTypeInAppMessage;


optional public func channelUserDidTapButtonNotificationView(_ notification: CHNotification, button: CHNotificationButton)
optional public func channelUserDidTapPushNotificationTypeConversations()
optional public func channelUserDidTapPushNotificationTypeInAppMessage()

Push notification

If you have push notification capability enabled in your app. Channel SDK will do everything for you.
However, if you want to provide user to opt-out from a push notification. This is disable
You can call the method below passing boolean value to it.

[Channel pushNotificationEnabled:YES];


We are always happy to help. Send us an email at

You can’t perform that action at this time.