I've been trying to develop a status bar app for Yosemite, which is my first OS X app, but when I searched for the document, the NSStatusItem
documentation says that almost all of the properties and methods there (e.g. .title
, .highlightMode
, and .image
) are deprecated in OS X 10.10.
So I wonder how I can create a status bar app for Yosemite. I found those documentations from Dash, but it's weird that Apple's documentation doesn't make it deprecated yet. But I know they are usually slow to update the documentation, though I wonder then how and where Dash got those seemingly updated information...
So which is the correct? And if it is deprecated, where can I find the Yosemite-style status bar development resources?
I use Xcode 6.1 Beta and Swift.
In 10.10,
NSStatusItem
has a newbutton
property which returns an instance of a new class,NSStatusBarButton
inheriting fromNSButton
. This is what should be used instead of setting a custom view on the status item. The deprecated methods ofNSStatusItem
just forward on to the corresponding method of the button.See the header files (NSStatusItem.h and NSStatusBarButton.h) for the most current and accurate documentation. The prerelease class references seem to be incomplete. There's some brief, indirect mentions of these changes in the 10.10 AppKit release notes.