One Logo Pool Ball
SuggestedActions · IOS API REFERENCE

SuggestedActionsMessage.Participant

struct · iOS 27.0+ · SDK 27.1

struct Participant

A sender or recipient of a message in a conversation. Create a `Participant` by providing a display name, a handle that uniquely identifies the participant, and a Boolean value that indicates whether the participant is the user of this device. Common handles are phone numbers or email addresses, but you can use any string that uniquely identifies a participant within your app's user identity system. To enable the Suggested Actions to tailor the suggested actions to the person who uses a device, make sure the `isUser` parameter of ``init(name:handle:isUser:)`` is `true` for the participant that uses the device. Set `isUser` to `false` for other participants. The following code snippet shows how an app can initialize a `Participant` who uses the current device and a second participant who sends a message from their own device to the first participant's device: ```swift // The participant who uses this device. let user = SuggestedActionsMessage.Participant( name: "Anne Johnson", handle: "annejohnson1@icloud.com", isUser: true ) // A second participant, usually contact in the conversation. let contact = SuggestedActionsMessage.Participant( name: "Juan Chavez", handle: "chavez4@icloud.com", isUser: false ) ```

Members (1)

init · iOS 27.0+

init

TypeScript
static init(name: string, handle: string, isUser: boolean): SuggestedActionsMessage_Participant
Swift declaration
init(name: String, handle: String, isUser: Bool)

Creates a participant in a conversation. - Parameters: - name: The participant's display name, for example, Juan Chavez. - handle: A unique identifier for the participant, like an email address or phone number. - isUser: A Boolean value that indicates whether the participant is the user of this device. Set `isUser` to `true` for the participant whose identity matches the user signed in to your app on this device, and `false` for every other participant.

Skipped declarations

No declarations were skipped in this snapshot.

All SuggestedActions types →