How to change app icon on the dock in macOS with Mac Catalyst

I would like to change app icon on the dock programmatically. Like how calendar app changes icon from day to day. (This is about icon on the dock only, not the app icon itself.)

I have done some researched and found this 'applicationIconImage' https://developer.apple.com/documentation/appkit/nsapplication/1428744-applicationiconimage But it doesn't say it is available in Mac Catalyst.

Appreciate if you anyone has ideas how to do this. Thank you.