change icon at runtime

Hello everybody,

is someone know a simple solution to change the icon of the application at runtime on OSX ?


Yes. As mentioned in many Threads in this Forum already, you can use DockItem for this. :wink:

Don’t use the Dockitem because it crashes on Mojave. Feedback doesn’t want me to log in. When you do a search for “dock” you should find the Feedback issue.

@Sascha S Thanks
@Beatrix Willius I hope they correct it for the next version


We have functions in MBS Plugin for that, too.

See NSDockTileMBS class…

Forgive me, for I forgot to update my thread in regards to this. I was experiencing crashing; however Xojo have confirmed that it does work, once an Icon has been set. Which is missing from the demo project and the application I am working on.

I believe that’s this issue feedback://showreport?report_id=52636. It’s more subtle than “accessing it causes a crash”. It’s accessing it when the app has no assigned icon that causes a crash.

The workaround is to assign the app icon, as Sam said.

@Christian Schmitz Thanks, i will use this !

@Christian Schmitz
is there a way in MBS to make the icon rebound ?

Isn’t that a MacOS behavior ?

Yes It’s a MacOS behavior, my original question is about MacOS (OSX) app.

I just repeated it from a conversion with a Xojo engineer, I didn’t figure out the solution to the crash.

I rephrase it:

This is an OS feature. Now can that be replicated ? Is there’s a Declare to make an Icon rebound ?

is there a way in MBS to make the icon rebound ?
That question was not directed to me, sorry.