Method Signature
If the chat doesn’t exist, the SDK will automatically create it using the address extracted from
chatGuid.Parameters
The unique identifier for the chat. Format:
{service};-;{address} or {service};+;{participants}Examples:iMessage;-;[email protected]SMS;-;+11234567890iMessage;+;[email protected],[email protected](group chat)
The text content of the message to send
Temporary GUID for tracking the message before server confirmation. Auto-generated if not provided.
Subject line for the message (typically used in group messages)
The effect to apply to the message. See Message Effects for available effect IDs.Examples:
com.apple.messages.effect.CKConfettiEffect(confetti)com.apple.messages.effect.CKFireworksEffect(fireworks)com.apple.MobileSMS.expressivesend.loud(loud)
Effects require Private API to be enabled on the BlueBubbles server
GUID of a message to reply to or reference
The part index for multi-part messages
Whether to enable rich link previews for URLs in the message
Response
Returns aMessageResponse object:
Unique identifier for the sent message
The message text content
Timestamp (milliseconds since epoch) when the message was created
The temporary GUID used for tracking
Always
true for sent messagesThe handle (contact) associated with the message
Array of chats this message belongs to
Array of attachments (empty for text-only messages)
Examples
Basic Text Message
Message with Confetti Effect
Message with Subject
SMS Message
Message with Custom Tracking
Error Handling
Related Methods
- editMessage - Edit a sent message
- unsendMessage - Unsend (retract) a message
- sendReaction - React to a message with a tapback
- Message Effects - Complete list of effect IDs