Skip to main content

setMessageListener

Feature Introduction

Description

Set a message event listener to provide asynchronous callback notifications for message-related events, so that the UI can perceive and handle them promptly.

Note
  1. Call immediately after initSDK.
  2. Can only be called once.

Function Prototype


- (void)addAdvancedMsgListener:(id<OIMAdvancedMsgListener>)listener NS_SWIFT_NAME(addAdvancedMsgListener(listener:));

Return Value

Parameter NameData TypeDescription
listenerid < OIMAdvancedMsgListener >Required

Code Example


[OIMManager.callbacker addAdvancedMsgListener:self];