Browse SDKs · iOS
SDKsiOS

Create a custom message

Create a structured application-defined message with OpenIM iOS SDK.

Copy
OIMMessageInfo *message =
    [OIMMessageInfo createCustomMessage:json
                              extension:@"com.example.order"
                            description:@"Order card"];

The three arguments are the serialized application data, protocol identifier, and fallback text. Receiving clients should validate the protocol version and fields. Authoritative state for permissions, payments, approvals, and similar workflows must remain on your application server. This selector only creates an object to be sent.