We have a xib file that contains a toolbar with some items in it. The toolbar has an IBOutlet defined in its files owner. Before macOS 15 - we were able to reach the items in the toolbar by using the items property.
The File Owner for the xib containing the toolbar is a NSViewController
e.g.
@IBOutlet var theToolbar: NSToolbar!
required init?(coder: NSCoder) {
super.init(coder: coder)
Bundle.main.loadNibNamed("ToolbarDesign", owner: self, topLevelObjects:nil)
}
and then later in code...
func getItems()
{
let items:[NSToolbarItem]? = mainRightToolbar?.items
}
Prior to macOS15 - items would contain the NSToolbarItems specified in the xib design. Now, in macOS 15 - the items array is not nil but doesn't contain any items either.
What needs to be don't for macOS15 specifically to enable the items property of NSToolbar to work again?