Undefined symbols error when trying to use NSToolbarPrimarySidebarTrackingSeparatorItemIdentifier & NSToolbarSupplementarySidebarTrackingSeparatorItemIdentifier

I've been getting an errors while building about undefined symbols when trying to use
Code Block
primarySidebarTrackingSeparatorItemIdentifier
or
Code Block
supplementarySidebarTrackingSeparatorItemIdentifier
on Xcode 12 beta1 & beta2. Am I doing something wrong, or are these not yet available in the betas?

Accepted Reply

Try this, for now:

Code Block
extension NSToolbarItem.Identifier {
static let primarySeparator = NSToolbarItem.Identifier(rawValue: "NSToolbarPrimarySidebarTrackingSeparatorItem")
static let supplementarySeparator = NSToolbarItem.Identifier(rawValue: "NSToolbarSupplementarySidebarTrackingSeparatorItem")
}

Replies

Try this, for now:

Code Block
extension NSToolbarItem.Identifier {
static let primarySeparator = NSToolbarItem.Identifier(rawValue: "NSToolbarPrimarySidebarTrackingSeparatorItem")
static let supplementarySeparator = NSToolbarItem.Identifier(rawValue: "NSToolbarSupplementarySidebarTrackingSeparatorItem")
}

Awesome, thanks!
Looks like these are now available in beta 4 (so no need to use the strings anymore), also appear to work much better than in previous betas.
Yep, beta 4 seems to fix these. Now getting some weirdness when using the toggleSidebar item in that the window title appears in the primary column rather than the supplementary column, and the toggleSidebar item moves to the far right within the overflow item. This must be a bug, toggling the toolbar into icon + label mode and back to icon only mode seems to fix it temporarily.
There are tons of issues with the toolbar at the moment. Using the new NSSearchToolbarItem, it will sometimes randomly (for no obvious reason) insert empty space between it & the item before it. Doing anything that causes the toolbar to perform it's layout seems to usually fixes these. The problem is that NSToolbar is not a subclass of NSView, so we can't really force it to perform it's layout without hacks (like toggling it's display mode).
Neither of these identifiers seems to work as of macOS Big Sur Beta 6, anyone have any workaround?

Neither of these identifiers seems to work as of macOS Big Sur Beta 6

Confirmed. Beta 6 has a lot of broken things. 😟