<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSDockTilePlugIn/setDockTile(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSDockTilePlugIn(im)setDockTile:"
  },
  "title" : "setDockTile(_:)"
}
-->

# setDockTile(_:)

Invoked when the plug-in is first loaded and when the application is removed from the Dock.

```
func setDockTile(_ dockTile: NSDockTile?)
```

## Parameters

`dockTile`

The dock tile associated with the application, or `nil` if the application has been removed from the Dock.

## Discussion

The plugin is loaded in a system process at login time or when the application tile is added to the Dock.

The principal class of the plug-in must implement the `NSDockTilePlugIn` protocol.

---

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)