Quick Start

Building a new app

If you are developing an application from scratch, a convenient way to begin is by building your app on top of our Sample UI project.

SAMPLE APP - CLICK HERE TO VIEW REPOSITORY
You can open the sample project from Xcode or by running the command below.

Duis bibendum libero arcu, at venenatis sapien tempus quis. Donec tincidunt nisl

Back To Top

Creating a IMSDK Application

Duis bibendum libero arcu, at venenatis sapien tempus quis. Donec tincidunt nisl eros, sed pulvinar libero sodales in. Ut sagittis, lectus ut maximus pharetra, arcu eros lobortis sapien, et viverra dui tellus vitae purus. Morbi rhoncus dui et felis venenatis, eget ornare mi tempor.

Back To Top

Authentication

Updating a User Profile and Profile Image

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris non nunc interdum, tempor ex vel, tristique urna. In vitae sodales est, non bibendum ex. Pellentesque nec elementum turpis.

Ut metus odio, congue eu vehicula ornare, tincidunt eget ipsum. Aliquam quis elit arcu. Donec condimentum tincidunt ante quis dictum. Vestibulum ullamcorper purus sed dignissim ornare.

Objective-C

[SBDMain connectWithUserId:USER_ID completionHandler:^(SBDUser * _Nullable user, SBDError * _Nullable error) {
    // ...
}];

Swift

SBDMain.connect(withUserId: USER_ID, completionHandler: { (user, error) in 
    // ...
})

Back To Top

Disconnecting

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris non nunc interdum, tempor ex vel, tristique urna. In vitae sodales est, non bibendum ex. Pellentesque nec elementum turpis.

Ut metus odio, congue eu vehicula ornare, tincidunt eget ipsum. Aliquam quis elit arcu. Donec condimentum tincidunt ante quis dictum. Vestibulum ullamcorper purus sed dignissim ornare.

Objective-C

[SBDMain connectWithUserId:USER_ID completionHandler:^(SBDUser * _Nullable user, SBDError * _Nullable error) {
    // ...
}];

Swift

SBDMain.connect(withUserId: USER_ID, completionHandler: { (user, error) in 
    // ...
})

Back To Top

Connecting with UserID and Access Token

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris non nunc interdum, tempor ex vel, tristique urna. In vitae sodales est, non bibendum ex. Pellentesque nec elementum turpis.

Ut metus odio, congue eu vehicula ornare, tincidunt eget ipsum. Aliquam quis elit arcu. Donec condimentum tincidunt ante quis dictum. Vestibulum ullamcorper purus sed dignissim ornare.

Objective-C

[SBDMain connectWithUserId:USER_ID completionHandler:^(SBDUser * _Nullable user, SBDError * _Nullable error) {
    // ...
}];

Swift

SBDMain.connect(withUserId: USER_ID, completionHandler: { (user, error) in 
    // ...
})

Back To Top

Connecting with UserID

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris non nunc interdum, tempor ex vel, tristique urna. In vitae sodales est, non bibendum ex. Pellentesque nec elementum turpis.

Objective-C

[SBDMain connectWithUserId:USER_ID completionHandler:^(SBDUser * _Nullable user, SBDError * _Nullable error) {
    // ...
}];

Swift

SBDMain.connect(withUserId: USER_ID, completionHandler: { (user, error) in 
    // ...
})

Back To Top

Initializing with APP_ID

Please initialize IMSDK using the APP_ID assigned for your IMSDK application before trying to login IMSDK.
You could initialize it typically in your user login view controller.

Objective-C

[SBDMain initWithApplicationId:APP_ID];

Swift

SBDMain.initWithApplicationId(APP_ID)

Back To Top

Open Channel

Getting a list of Open Channels

Phasellus nisl leo, ultricies vel justo ut, posuere tincidunt sem. Sed ac nisl molestie, imperdiet neque nec, auctor risus. Suspendisse eleifend eleifend lobortis. Sed ac lacus tristique, varius tortor tempor, auctor ante.

Suspendisse vitae porta neque. Proin facilisis ac tortor eu feugiat. Nunc ullamcorper turpis nec metus feugiat, in suscipit odio posuere. Nulla nec consectetur felis, non suscipit purus.

Objective-C

[SBDOpenChannel createChannelWithName:NAME coverUrl:COVER_URL data:DATA operatorUserIds:nil completionHandler:^(SBDOpenChannel * _Nullable channel, SBDError * _Nullable error) {
    if (error != nil) {
        NSLog(@"Error: %@", error);
        return;
    }

    // ...
}];

Swift

SBDOpenChannel.createChannel(withName: NAME, coverUrl: COVER_URL, data: DATA, operatorUserIds: nil, completionHandler: { (channel, error) in
    if error != nil {
        NSLog("Error: %@", error!)
        return
    }

    // ...
})

Back To Top

Creating an Open Channel

Phasellus nisl leo, ultricies vel justo ut, posuere tincidunt sem. Sed ac nisl molestie, imperdiet neque nec, auctor risus. Suspendisse eleifend eleifend lobortis. Sed ac lacus tristique, varius tortor tempor, auctor ante

 

Suspendisse vitae porta neque. Proin facilisis ac tortor eu feugiat. Nunc ullamcorper turpis nec metus feugiat, in suscipit odio posuere. Nulla nec consectetur felis, non suscipit purus.

Objective-C

[SBDOpenChannel createChannelWithName:NAME coverUrl:COVER_URL data:DATA operatorUserIds:nil completionHandler:^(SBDOpenChannel * _Nullable channel, SBDError * _Nullable error) {
    if (error != nil) {
        NSLog(@"Error: %@", error);
        return;
    }

    // ...
}];

Swift

SBDOpenChannel.createChannel(withName: NAME, coverUrl: COVER_URL, data: DATA, operatorUserIds: nil, completionHandler: { (channel, error) in
    if error != nil {
        NSLog("Error: %@", error!)
        return
    }

    // ...
})

Back To Top

Advanced Open Channel

Admin messages

Mauris placerat, justo congue iaculis facilisis, libero metus fringilla tortor, in scelerisque tellus felis vulputate dolor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam porttitor risus mauris, in congue nulla euismod vel.

Proin ligula nisi, pretium tempus orci ac, sagittis suscipit libero. In hendrerit velit nisi, at aliquet ipsum lobortis quis. Nunc aliquam nulla sit amet scelerisque dapibus.

Channel cover images

When creating a channel, you can add a cover image by specifying an image URL or file.

Objective-C
[SBDOpenChannel createChannelWithName:NAME coverUrl:COVER_URL data:DATA operatorUsers:nil completionHandler:^(SBDOpenChannel * _Nullable channel, SBDError * _Nullable error) {
    if (error != nil) {
        // Error.
        return;
    }
}];

Back To Top

Group Channel

Inviting users to an existing channel

Mauris faucibus suscipit tellus, nec bibendum justo rutrum ut. Maecenas non leo molestie, convallis ex hendrerit, iaculis lectus. Morbi fermentum volutpat dolor pellentesque dictum.

Distinct property : Ut dui nisl, eleifend sed interdum vitae, posuere in metus. Quisque feugiat laoreet tristique. Maecenas sed nisl justo. Ut et tempus ex.

Aliquam vel tortor eu metus ultricies aliquet. Etiam pretium tellus ligula, sit amet feugiat erat ultricies ac. Fusce viverra dui odio, congue semper dolor pharetra faucibus. Quisque laoreet sapien at mollis accumsan.

Objective-C
[SBDGroupChannel createChannelWithUserIds:userIds isDistinct:NO completionHandler:^(SBDGroupChannel * _Nullable channel, SBDError * _Nullable error) {
    if (error != nil) {
        NSLog(@"Error: %@", error);
        return;
    }

    // ...
}];
Swift
channel.leave { (error) in
    if error != nil {
        NSLog("Error: %@", error!)
        return
    }

    // ...    
}

Back To Top

Getting a list of my Group Channels

Mauris faucibus suscipit tellus, nec bibendum justo rutrum ut. Maecenas non leo molestie, convallis ex hendrerit, iaculis lectus. Morbi fermentum volutpat dolor pellentesque dictum.

Distinct property : Ut dui nisl, eleifend sed interdum vitae, posuere in metus. Quisque feugiat laoreet tristique. Maecenas sed nisl justo. Ut et tempus ex.

Aliquam vel tortor eu metus ultricies aliquet. Etiam pretium tellus ligula, sit amet feugiat erat ultricies ac. Fusce viverra dui odio, congue semper dolor pharetra faucibus. Quisque laoreet sapien at mollis accumsan.

Objective-C
[SBDGroupChannel createChannelWithUserIds:userIds isDistinct:NO completionHandler:^(SBDGroupChannel * _Nullable channel, SBDError * _Nullable error) {
    if (error != nil) {
        NSLog(@"Error: %@", error);
        return;
    }

    // ...
}];
Swift
channel.leave { (error) in
    if error != nil {
        NSLog("Error: %@", error!)
        return
    }

    // ...    
}

Back To Top

Sending messages

Mauris faucibus suscipit tellus, nec bibendum justo rutrum ut. Maecenas non leo molestie, convallis ex hendrerit, iaculis lectus. Morbi fermentum volutpat dolor pellentesque dictum.

Distinct property : Ut dui nisl, eleifend sed interdum vitae, posuere in metus. Quisque feugiat laoreet tristique. Maecenas sed nisl justo. Ut et tempus ex.

Aliquam vel tortor eu metus ultricies aliquet. Etiam pretium tellus ligula, sit amet feugiat erat ultricies ac. Fusce viverra dui odio, congue semper dolor pharetra faucibus. Quisque laoreet sapien at mollis accumsan.

Objective-C
[SBDGroupChannel createChannelWithUserIds:userIds isDistinct:NO completionHandler:^(SBDGroupChannel * _Nullable channel, SBDError * _Nullable error) {
    if (error != nil) {
        NSLog(@"Error: %@", error);
        return;
    }

    // ...
}];
Swift
channel.leave { (error) in
    if error != nil {
        NSLog("Error: %@", error!)
        return
    }

    // ...    
}

Back To Top

Receiving messages

Mauris faucibus suscipit tellus, nec bibendum justo rutrum ut. Maecenas non leo molestie, convallis ex hendrerit, iaculis lectus. Morbi fermentum volutpat dolor pellentesque dictum.

Distinct property : Ut dui nisl, eleifend sed interdum vitae, posuere in metus. Quisque feugiat laoreet tristique. Maecenas sed nisl justo. Ut et tempus ex.

Aliquam vel tortor eu metus ultricies aliquet. Etiam pretium tellus ligula, sit amet feugiat erat ultricies ac. Fusce viverra dui odio, congue semper dolor pharetra faucibus. Quisque laoreet sapien at mollis accumsan.

Objective-C
[SBDGroupChannel createChannelWithUserIds:userIds isDistinct:NO completionHandler:^(SBDGroupChannel * _Nullable channel, SBDError * _Nullable error) {
    if (error != nil) {
        NSLog(@"Error: %@", error);
        return;
    }

    // ...
}];
Swift
channel.leave { (error) in
    if error != nil {
        NSLog("Error: %@", error!)
        return
    }

    // ...    
}

Back To Top

Leaving a Group Channel

Mauris faucibus suscipit tellus, nec bibendum justo rutrum ut. Maecenas non leo molestie, convallis ex hendrerit, iaculis lectus. Morbi fermentum volutpat dolor pellentesque dictum.

Distinct property : Ut dui nisl, eleifend sed interdum vitae, posuere in metus. Quisque feugiat laoreet tristique. Maecenas sed nisl justo. Ut et tempus ex.

Aliquam vel tortor eu metus ultricies aliquet. Etiam pretium tellus ligula, sit amet feugiat erat ultricies ac. Fusce viverra dui odio, congue semper dolor pharetra faucibus. Quisque laoreet sapien at mollis accumsan.

Objective-C
[SBDGroupChannel createChannelWithUserIds:userIds isDistinct:NO completionHandler:^(SBDGroupChannel * _Nullable channel, SBDError * _Nullable error) {
    if (error != nil) {
        NSLog(@"Error: %@", error);
        return;
    }

    // ...
}];
Swift
channel.leave { (error) in
    if error != nil {
        NSLog("Error: %@", error!)
        return
    }

    // ...    
}

Back To Top

Entering an Open Channel

A Group Channel Mauris faucibus suscipit tellus, nec bibendum justo rutrum ut. Maecenas non leo molestie, convallis ex hendrerit, iaculis lectus. Morbi fermentum volutpat dolor pellentesque dictum.

A user will automatically receive all messages from the group channels that they are a member of.

A Group Channel can be created on demand by a user through the IMSDK.

Distinct property : Ut dui nisl, eleifend sed interdum vitae, posuere in metus. Quisque feugiat laoreet tristique. Maecenas sed nisl justo. Ut et tempus ex.

Aliquam vel tortor eu metus ultricies aliquet. Etiam pretium tellus ligula, sit amet feugiat erat ultricies ac. Fusce viverra dui odio, congue semper dolor pharetra faucibus. Quisque laoreet sapien at mollis accumsan.

Objective-C
[SBDGroupChannel createChannelWithUserIds:userIds isDistinct:NO completionHandler:^(SBDGroupChannel * _Nullable channel, SBDError * _Nullable error) {
    if (error != nil) {
        NSLog(@"Error: %@", error);
        return;
    }

    // ...
}];

Back To Top

Loading previous messages

Mauris faucibus suscipit tellus, nec bibendum justo rutrum ut. Maecenas non leo molestie, convallis ex hendrerit, iaculis lectus. Morbi fermentum volutpat dolor pellentesque dictum.

Distinct property : Ut dui nisl, eleifend sed interdum vitae, posuere in metus. Quisque feugiat laoreet tristique. Maecenas sed nisl justo. Ut et tempus ex.

Aliquam vel tortor eu metus ultricies aliquet. Etiam pretium tellus ligula, sit amet feugiat erat ultricies ac. Fusce viverra dui odio, congue semper dolor pharetra faucibus. Quisque laoreet sapien at mollis accumsan.

Objective-C
[SBDGroupChannel createChannelWithUserIds:userIds isDistinct:NO completionHandler:^(SBDGroupChannel * _Nullable channel, SBDError * _Nullable error) {
    if (error != nil) {
        NSLog(@"Error: %@", error);
        return;
    }

    // ...
}];
Swift
channel.leave { (error) in
    if error != nil {
        NSLog("Error: %@", error!)
        return
    }

    // ...    
}

Back To Top

Advanced Group Channel

Getting a list of all channel members

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam gravida, diam eget scelerisque feugiat, urna ante pellentesque augue, vitae dignissim ex felis eget dolor. Pellentesque euismod vel turpis eu luctus.

Objective-C

NSArray *members = groupChannel.members;

Swift

let members = groupChannel.members;

Back To Top

Getting participants’ online statuses

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam gravida, diam eget scelerisque feugiat, urna ante pellentesque augue, vitae dignissim ex felis eget dolor. Pellentesque euismod vel turpis eu luctus.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam gravida, diam eget scelerisque feugiat, urna ante pellentesque augue, vitae dignissim ex felis eget dolor. Pellentesque euismod vel turpis eu luctus.

Objective-C

NSArray *members = groupChannel.members;

Swift

let members = groupChannel.members;

Back To Top

Channel Metadata

MetaData

Phasellus nisl leo, ultricies vel justo ut, posuere tincidunt sem. Sed ac nisl molestie, imperdiet neque nec, auctor risus. Suspendisse eleifend eleifend lobortis. Sed ac lacus tristique, varius tortor tempor, auctor ante.

Suspendisse vitae porta neque. Proin facilisis ac tortor eu feugiat. Nunc ullamcorper turpis nec metus feugiat, in suscipit odio posuere. Nulla nec consectetur felis, non suscipit purus.

Objective-C

[SBDOpenChannel createChannelWithName:NAME coverUrl:COVER_URL data:DATA operatorUserIds:nil completionHandler:^(SBDOpenChannel * _Nullable channel, SBDError * _Nullable error) {
    if (error != nil) {
        NSLog(@"Error: %@", error);
        return;
    }

    // ...
}];

Swift

SBDOpenChannel.createChannel(withName: NAME, coverUrl: COVER_URL, data: DATA, operatorUserIds: nil, completionHandler: { (channel, error) in
    if error != nil {
        NSLog("Error: %@", error!)
        return
    }

    // ...
})

Back To Top

MetaCounter

Phasellus nisl leo, ultricies vel justo ut, posuere tincidunt sem. Sed ac nisl molestie, imperdiet neque nec, auctor risus. Suspendisse eleifend eleifend lobortis. Sed ac lacus tristique, varius tortor tempor, auctor ante.

Suspendisse vitae porta neque. Proin facilisis ac tortor eu feugiat. Nunc ullamcorper turpis nec metus feugiat, in suscipit odio posuere. Nulla nec consectetur felis, non suscipit purus.

Objective-C

[SBDOpenChannel createChannelWithName:NAME coverUrl:COVER_URL data:DATA operatorUserIds:nil completionHandler:^(SBDOpenChannel * _Nullable channel, SBDError * _Nullable error) {
    if (error != nil) {
        NSLog(@"Error: %@", error);
        return;
    }

    // ...
}];

Swift

SBDOpenChannel.createChannel(withName: NAME, coverUrl: COVER_URL, data: DATA, operatorUserIds: nil, completionHandler: { (channel, error) in
    if error != nil {
        NSLog("Error: %@", error!)
        return
    }

    // ...
})

Back To Top

Event Handler

Connection Delegate

Phasellus nisl leo, ultricies vel justo ut, posuere tincidunt sem. Sed ac nisl molestie, imperdiet neque nec, auctor risus. Suspendisse eleifend eleifend lobortis. Sed ac lacus tristique, varius tortor tempor, auctor ante.

Suspendisse vitae porta neque. Proin facilisis ac tortor eu feugiat. Nunc ullamcorper turpis nec metus feugiat, in suscipit odio posuere. Nulla nec consectetur felis, non suscipit purus.

Objective-C

[SBDOpenChannel createChannelWithName:NAME coverUrl:COVER_URL data:DATA operatorUserIds:nil completionHandler:^(SBDOpenChannel * _Nullable channel, SBDError * _Nullable error) {
    if (error != nil) {
        NSLog(@"Error: %@", error);
        return;
    }

    // ...
}];

Swift

SBDOpenChannel.createChannel(withName: NAME, coverUrl: COVER_URL, data: DATA, operatorUserIds: nil, completionHandler: { (channel, error) in
    if error != nil {
        NSLog("Error: %@", error!)
        return
    }

    // ...
})

Back To Top

Channel Delegate

Phasellus nisl leo, ultricies vel justo ut, posuere tincidunt sem. Sed ac nisl molestie, imperdiet neque nec, auctor risus. Suspendisse eleifend eleifend lobortis. Sed ac lacus tristique, varius tortor tempor, auctor ante.

Suspendisse vitae porta neque. Proin facilisis ac tortor eu feugiat. Nunc ullamcorper turpis nec metus feugiat, in suscipit odio posuere. Nulla nec consectetur felis, non suscipit purus.

Objective-C

[SBDOpenChannel createChannelWithName:NAME coverUrl:COVER_URL data:DATA operatorUserIds:nil completionHandler:^(SBDOpenChannel * _Nullable channel, SBDError * _Nullable error) {
    if (error != nil) {
        NSLog(@"Error: %@", error);
        return;
    }

    // ...
}];

Swift

SBDOpenChannel.createChannel(withName: NAME, coverUrl: COVER_URL, data: DATA, operatorUserIds: nil, completionHandler: { (channel, error) in
    if error != nil {
        NSLog("Error: %@", error!)
        return
    }

    // ...
})

Back To Top

Push Notifications

Push Notifications for iOS

Phasellus nisl leo, ultricies vel justo ut, posuere tincidunt sem. Sed ac nisl molestie, imperdiet neque nec, auctor risus. Suspendisse eleifend eleifend lobortis. Sed ac lacus tristique, varius tortor tempor, auctor ante.

Suspendisse vitae porta neque. Proin facilisis ac tortor eu feugiat. Nunc ullamcorper turpis nec metus feugiat, in suscipit odio posuere. Nulla nec consectetur felis, non suscipit purus.

Objective-C

[SBDOpenChannel createChannelWithName:NAME coverUrl:COVER_URL data:DATA operatorUserIds:nil completionHandler:^(SBDOpenChannel * _Nullable channel, SBDError * _Nullable error) {
    if (error != nil) {
        NSLog(@"Error: %@", error);
        return;
    }

    // ...
}];

Swift

SBDOpenChannel.createChannel(withName: NAME, coverUrl: COVER_URL, data: DATA, operatorUserIds: nil, completionHandler: { (channel, error) in
    if error != nil {
        NSLog("Error: %@", error!)
        return
    }

    // ...
})

Back To Top

Miscellaneous

Client SDK generated Error Codes

Phasellus nisl leo, ultricies vel justo ut, posuere tincidunt sem. Sed ac nisl molestie, imperdiet neque nec, auctor risus. Suspendisse eleifend eleifend lobortis. Sed ac lacus tristique, varius tortor tempor, auctor ante.

Error Value Description
IMSErrorInvalidInitialization 800100 Initialization failed

Back To Top

Support

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

©2017 iMSDK. All right Reserved.

Log in with your credentials

Forgot your details?