IMbeeCore

What is it?

IMbeeCore is a high level library that makes building a messaging app easy. IMbeeCore takes care about connecting to the server, synchronizing between connections, saving local data to disk, high-level conversation actions (sending messages, adding/removing contacts, ...) ...

Add IMbeeCore.framework to 'Embedded Binaries' on your project and run pod install. That's all!

Basic setup

Setup IMbeeCore with an existing IMbee user:

NSString *apikey, *api_domain, *xmpp_domain;

IMbeeConfig *imbeeConfig = [[IMbeeConfig alloc] initWithServerAddress:api_domain
                                                           serverXmpp:xmpp_domain
                                                          serverAdmin:nil
                                                       xmppUserDomain:@"woowos"
                                                               apiKey:apiKey];

[IMbeeCore prepare:imbeeConfig];

if (IMbeeCore.profile.installationCompleted != InstallationCompleted) {
    [IMbeeCore registerOrSyncUserWithId:@"arbitrary-id-choosen-by-thirdparty"
                             deviceName:@"My iPhone"
                             hardwareId:@"n928c7459ui234c8qncviwt"
                               platform:@"ios"
                              osVersion:@"11"
                                   done:^(Profile *profile, bool previously_registered) {
        [IMbeeCore connect];
    }];
}
else
    [IMbeeCore connect];

Quick Setup

With this new function you can directly create/connect your user and join/create a conversation:

Examples

Sending a message from a conversation:

Polling unread messages by conversation:

Sending 'Content Messages' (with flags) programmatically:Copied to clipboard

Last updated