Where can I find more information on how Lazarus binds this resource and how it tells macOS to use this resource as the app icon?
I am trying to get my head around this wiki article because if I understood your original issue correctly that seems to contradict your practical experience.
Exactly. The article is all about bundle icons. The crazy discovery for us here is that bundle icons are NOT being honored because of whatever voodoo Lazarus is doing to the compiled binary. Really incredible.
Edit: Pretty sure there's some API the LCL is calling to activate the " resource icon". The app launches correctly with the bundle icon but then this icon is replaced with the "resource icon", never to return.
Shall we be discovering tomorrow that Linux ELF binaries have also supported icons all along in this manner, and Lazarus is of course there to take advantage of it; ignoring whatever has been specified in .desktop files?
fwiw the article contains some links that might perhaps be of interest to you.
Which ones, just to make sure I'm not missing anything?
Would CocoaInt.CocoaIconUse := false help at all?
tbh, I have no idea how resources work with MacOS (other than how resources work with fpc/lazarus).
Me neither, it wasn't until today that I found out this was even a possibility (a non-app-bundle icon that works on modern macOS [and in fact supersedes the bundle icon outright]).