I want to change the dock icon of an app into one big character like an "A" or "B" for example using swift or objective C
how to change dock icon using setContentView to display one big character in mac os x
1.6k views Asked by Alaa Ahmad M. Zakaria At
        	2
        	
        There are 2 answers
0
                
                        
                            
                        
                        
                            On
                            
                            
                                                    
                    
                my two cents for OSX swift 4.x:
(make it flash..)
...
self.HeartBeatTimer = Timer.scheduledTimer(withTimeInterval: DELTA_T, repeats: true, block: { (t: Timer) in
      let name = colored ? "heartbeat" : "heartbeat_red"
      let image = NSImage(named:  name)            
      let appDockTile =  NSApplication.shared.dockTile
      appDockTile.contentView = NSImageView(image: image!)
      appDockTile.display()
}