close search

Real-time updates

Real-time updates are the most important part to 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 and 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: