SDKsiOS
Generate a conversation ID
Derive a conversation ID from a chat target with OpenIM iOS SDK.
When you only need the conversation ID, call the synchronous method instead of constructing the ID in application code:
NSString *conversationID = [[OIMManager manager]
getConversationIDBySessionType:OIMConversationTypeC2C
sourceID:targetUserID];For a one-to-one chat, sourceID is the other user's ID. For a group chat, it is the group ID and the type is OIMConversationTypeGroup. Do not continue with conversation operations if the returned value is empty. This method does not return an OIMConversationInfo or trigger a delegate.
Was this page helpful?