Awesome Open Source
Awesome Open Source


Show progress in your app's Dock icon

This package is used in production by the Gifski app. You might also like some of my other apps.


  • macOS 10.12+
  • Xcode 13+
  • Swift 5.5+


Swift Package Manager

Add in the Swift Package Manager tab in Xcode.


github "sindresorhus/DockProgress"


pod 'DockProgress'


Manually set the progress

import Cocoa
import DockProgress

foo.onUpdate = { progress in
	DockProgress.progress = progress

Specify a Progress instance

import Cocoa
import DockProgress

let progress = Progress(totalUnitCount: 1)
progress?.becomeCurrent(withPendingUnitCount: 1)

DockProgress.progressInstance = progress

The given Progress instance is weakly stored. It's up to you to retain it.


It comes with three styles. PR welcome for more.

Check out the example app in the Xcode project.

You can also draw a custom progress with .custom(drawHandler: (_ rect: CGRect) -> Void).


import DockProgress = .bar

This is the default.


import DockProgress = .squircle(color: .white.withAlphaComponent(0.5))

By default, it should perfectly fit a macOS 11 icon, but there's a inset parameter if you need to make any adjustments.


import DockProgress = .circle(radius: 55, color: .systemBlue)

Make sure to set a radius that matches your app icon.


import DockProgress = .badge(color: .systemBlue, badgeValue: { getDownloadCount() })

Large badgeValue numbers will be written in kilo short notation, for example, 1012 1k.

Note: The badgeValue is not meant to be used as a numeric percentage. It's for things like count of downloads, number of files being converted, etc.


  • Defaults - Swifty and modern UserDefaults
  • Preferences - Add a preferences window to your macOS app in minutes
  • KeyboardShortcuts - Add user-customizable global keyboard shortcuts to your macOS app
  • LaunchAtLogin - Add "Launch at Login" functionality to your macOS app
  • Regex - Swifty regular expressions
  • More

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Swift (95,399
Macos (8,824
Cocoapods (1,970
Icons (1,903
Carthage (816
Progress Bar (688
Swift Package (226
Related Projects