---
title: "init(identifiers:attribute:)"
framework: intents
role: symbol
role_heading: Initializer
path: "intents/insetmessageattributeintent/init(identifiers:attribute:)"
---

# init(identifiers:attribute:)

Initializes the set message attribute intent object with the specified identifiers and attribute.

## Declaration

```swift
init(identifiers: [String]?, attribute: INMessageAttribute)
```

## Parameters

- `identifiers`: An array of identifier strings representing the messages to modify. Each string represents the doc://com.apple.sirikit/documentation/Intents/INMessage/identifier of an doc://com.apple.sirikit/documentation/Intents/INMessage object that you provided previously.
- `attribute`: The attribute to apply to the messages. For a list of possible values, see doc://com.apple.sirikit/documentation/Intents/INMessageAttribute.

## Return Value

Return Value An initialized intent or nil if the object could not be created.

## Discussion

Discussion Typically, you don’t create instances of this class yourself. Siri creates instances when the user asks to modify the attributes of one or more messages. However, you can use this method during testing to create intent objects in order to validate your intent handling code paths.
