<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UserNotifications",
  "identifier" : "/documentation/UserNotifications/UNNotificationActionIcon/init(templateImageName:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "User Notifications"
    ],
    "preciseIdentifier" : "c:objc(cs)UNNotificationActionIcon(cm)iconWithTemplateImageName:"
  },
  "title" : "init(templateImageName:)"
}
-->

# init(templateImageName:)

Creates an action icon based on an image in your app’s bundle, preferably in an asset catalog.

```
convenience init(templateImageName: String)
```

## Parameters

`templateImageName`

The name of a custom image in the app’s asset catalog. If the image isn’t in your app’s asset catalog, this method searches the app bundle for the image.

    You don’t need to specify the filename extension or the     `@2x`     or     `@3x`     modifiers for this name. This method retrieves the appropriate image based on the system and the available image resources.

## Return Value

An action icon initialized with the specified template image provided by your app.

## Discussion

---

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)