SDKsiOS
Create an @all message
Create a message that mentions every group member with OpenIM iOS SDK.
Invoke createTextAtAllMessage:displayText:message: on OIMMessageInfo to construct a message that mentions every member of a group:
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | NSString * | Yes | The complete message text. |
displayText | NSString * | Yes | The display placeholder string representing all members (such as @All). |
message | OIMMessageInfo * _Nullable | No | Quoted message reference; pass nil if not quoting. |
Code example
OIMMessageInfo *message =
[OIMMessageInfo createTextAtAllMessage:@"@All Please review the announcement"
displayText:@"@All"
message:nil];Return value
Returns an initialized OIMMessageInfo model configured with an all-members mention.
State changes after the call
- Local memory instantiation: This method builds an object in memory only. Whether the current user is authorized to send
@allnotifications is enforced by server policies during dispatch. - Subsequent dispatch: Deliver this message to a group conversation by calling Send a message.
Was this page helpful?