Recent

Author Topic: [Answered] Changing icons in MacOS  (Read 2100 times)

madref

  • Hero Member
  • *****
  • Posts: 949
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
[Answered] Changing icons in MacOS
« on: September 19, 2021, 04:04:45 pm »

I have 6 basic colors (Red, Orange, Blue, Geen, Purple and Yellow. The customer can choose with color he would like to have.
In the app I change everything to these colors.


But now I am curious if it is possible to change the icon of a app on a Mac via code?
« Last Edit: September 20, 2021, 01:31:39 pm by madref »
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Lazarus 3.99 (rev main_3_99-649-ge13451a5ab) FPC 3.3.1 x86_64-darwin-cocoa
Mac OS X Monterey

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Changing icons in MacOS
« Reply #1 on: September 20, 2021, 01:12:37 pm »
You could edit the CFBundleIconFile key value in the application .plist file to change the icon and then restart the application. Be aware of the consequences of messing with the application bundle if the application has been code signed or notarized though.

madref

  • Hero Member
  • *****
  • Posts: 949
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Changing icons in MacOS
« Reply #2 on: September 20, 2021, 01:31:21 pm »
when I read your reply I think it is more work with little satisfying result.


So i will leave it with the original app's icon
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Lazarus 3.99 (rev main_3_99-649-ge13451a5ab) FPC 3.3.1 x86_64-darwin-cocoa
Mac OS X Monterey

 

TinyPortal © 2005-2018