---
title: "setDockTile(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsdocktileplugin/setdocktile(_:)"
---

# setDockTile(_:)

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

## Declaration

```swift
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

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.
