IMbeeUI

What is it?

IMbeeUI is a library that implements a rich chat-room view which makes straightforward integrating a chat window to your existing app.

Integration

IMbee SDK is private. Contact with IMbee Messenger to get more details.

You only need to add IMbeeCore.framework and IMbeeUI.framework into 'Embedded Binaries'. Then pod install dependencies from Podfile.

Then, you have to configure IMbeeCore with your credentials (checkout example code).

Finally, you only have to present the chat window when you want. See examples section below.

Examples

#import <IMbeeUI/IMbeeUI.h>
#import <IMbeeCore/IMbeeCore.h>

// ...

- (IBAction)presentChatRoom:(id)sender {
    Conversation *conv = [[IMbeeCore conversations] conversationWithWoowosId:@"190ab...cd874"];

    IMMessageListVC *vc = [IMbeeUI presentConversation:conv
                                              intoView:self.contr
                                      onViewController:self];

    [vc setMessageDelegate:self];
}

- (void)buttonPressed:(ButtonContentPart *)button onMessage:(Message *)message
{
    if ([button.type isEqualToString:@"url"]) {
        NSURL *url = [NSURL URLWithString:button.payload];

        if (url)
            [[UIApplication sharedApplication] openURL:url];
    }
}

UI Customization

Customize colors, radius ...

[IMbeeUI setPrimaryColor:[UIColor colorWithR:0 G:0x9a B:0xd8 A:1]];
[IMbeeUI setRightMessageBackgroundColor:[UIColor colorWithR:0 G:0x9a B:0xd8 A:1]];
[IMbeeUI setRightMessageTextColor:[UIColor whiteColor]];
[IMbeeUI setLeftMessageBackgroundColor:[UIColor colorWithR:0xe5 G:0xf4 B:0xfb A:1]];
[IMbeeUI setLeftMessageTextColor:[UIColor blackColor]];
[IMbeeUI setMessageRadius:12];

Icons customization

IMMessageListVC *vc = ...;

[vc setRightButtonImage:[UIImage imageNamed:@"CustomSendButton"]];

Last updated