2017-08-17 1 views

Répondre

0

// contact a le statut userId et la présence

for(QBContactListItem *contact in arrContactList) { 

    BOOL isOnline = contact.isOnline; 
    NSInteger userIdValue = contact.userID; 

    if(isOnline) { 
     NSLog(@"User %ld is online",(long)userIdValue); 
    } 
    else { 
     NSLog(@"User %ld is offline",(long)userIdValue); 
    } 
} 

// Lorsqu'un utilisateur de contact est en ligne ou hors ligne, cette méthode est appelée

- (void)chatDidReceiveContactItemActivity:(NSUInteger)userID isOnline:(BOOL)isOnline status:(NSString *)status{ 

    // here you can check presence status using isOnline and also we get userID 
    // so list of user IDs who are online can be maintained in an array 
}