SDKsiOS
Receive custom business messages
Register and remove the custom-business notification listener in OpenIM iOS SDK.
Your application must retain a strong reference to the same OIMCustomBusinessListener instance:
[[OIMManager callbacker] addCustomBusinessListener:businessListener];
// When the account scope ends:
[[OIMManager callbacker] removeCustomBusinessListener:businessListener];The dictionary supplied to onRecvCustomBusinessMessage: may be nil. When it is present, still validate the ID, type, version, and fields defined by your protocol, then merge it by an application-specific idempotency key. Regular custom chat messages continue to arrive through the new-message delegate.
Was this page helpful?