Thanks a lot for this comment. I was struggling for a day with this issue until I saw your solution. After I removed a NSToolbarItem(itemIdentifier: itemIdentifier, barButtonItem: barButtonItem) from the toolbar, all my windows and tabs responded to key commands as expected.
Post
Replies
Boosts
Views
Activity
Yes works in production.
If I am correct you cannot mix Swift and Objective-C in one target.
In one package, or all (depending on how your packages depend on each other) add an additional target where you place the Objective C files of the fix (or if you have already an objective-C target, you could add them there). Target definition should be something like: .target(name: "DecimalRoundFix", dependencies: []). Make sure that the header file is placed in the special folder named 'DecimalRoundFix/include'.
The .m file can be placed in the folder 'DecimalRoundFix. Add "DecimalRoundFix" to the dependencies of your main target.
You can then use @import DecimalRoundFix to import the fix in your swift code.
When finished, write a XCTest to test your code to make sure that everything works as it should.
Thank you for your answer. It then seems to me something is lacking, it would be nice if the ControlWidgetToggle would be informed when the parent app is terminated. I have submitted a suggestion using the feedback assistant.