I'm using the latest stable version Lazarus/FPC. Do you mean to download and install the trunk Lazarus/FPC?
Unfortunately, the term "stable" might not apply to Cocoa widgetset. Using trunk version for Cocoa is preferred
I will add that the icon did not exist. It was supposed to come from the source folder, but it wasn't there. However in Linux it did not cause the failure.
on Cocoa (and macOS) in general, the executable is not located in the source code. Instead it's located within a bundle (a special directory structure).
The image should be placed within the same bundle into a resource directory.
Thus the code that loads an image
Icon.LoadFromFile('icon.png')
would not work for OSX (unless you change current directory to the resource directory of the bundle) .
Yet again,
TrayIcon.Icon := Application.Icon;
should work just fine. (and it does work fine for Cocoa trunk)