Browse SDKs · iOS
Platform
SDKsiOS

Create a forwarded message

Create a single-message forward with OpenIM iOS SDK.

Copy

Invoke createForwardMessage: on OIMMessageInfo to construct a new forwarded message object copied from an existing historical message:

Parameters

ParameterTypeRequiredDescription
messageOIMMessageInfo *YesSource message object to forward, typically obtained from conversation history.

Code example

OIMMessageInfo *message =
    [OIMMessageInfo createForwardMessage:sourceMessage];

Return value

Returns a new initialized OIMMessageInfo model with its own unique clientMsgID. The original message content and delivery state remain unchanged.

State changes after the call

  1. Local memory instantiation: This method builds an in-memory message object without altering the source message record or committing new entries to local storage.
  2. Subsequent dispatch: Call Send a message to deliver the forwarded message to the desired user or group conversation.