<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SiriKit",
  "identifier" : "/documentation/Intents/INSetMessageAttributeIntent/init(identifiers:attribute:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Intents"
    ],
    "preciseIdentifier" : "c:objc(cs)INSetMessageAttributeIntent(im)initWithIdentifiers:attribute:"
  },
  "title" : "init(identifiers:attribute:)"
}
-->

# init(identifiers:attribute:)

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

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

## Parameters

`identifiers`

An array of identifier strings representing the messages to modify. Each string represents the [`identifier`](/documentation/Intents/INMessage/identifier) of an [`INMessage`](/documentation/Intents/INMessage) object that you provided previously.

`attribute`

The attribute to apply to the messages. For a list of possible values, see [`INMessageAttribute`](/documentation/Intents/INMessageAttribute).

## Return Value

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

## 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)