close search

Real-time updates

Real-time updates is the most important part in building an instant chat messaging application. Stringee provides very simple methods to register and listen for events. You need to implement StringeeClientObjectsDidChangeNotification to get Conversations, Messages updates.

    // Register
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleDidChangeObjectsNotification:) name:StringeeClientObjectsDidChangeNotification object:stringeeClient];

    // Handle
    - (void)handleDidChangeObjectsNotification:(NSNotification *)notification {
        NSArray *objectChanges = [notification.userInfo objectForKey:StringeeClientObjectChangesUserInfoKey];

objectChanges is an array of StringeeObjectChanges. StringeeObjectChange has two propertys which will let you know about the change: