NSStatusBar loses state

Viewed 115

Some time ago I wrote an app using NSStatusBar to put a menu in the status bar. This had ever been working nicely. I did not use it for 2 or 3 years (so I guess in Yosemite it worked well). Now, when I run it in High Sierra it does lose state information. That is a menu which had been checked does not appear checked on the next time the menu is opened. Anyone got a clue whether something has changed in that area?

P.S. I thought that upgrading to Swift 4.something and targeting 10.13 rather than 10.9 would have fixed the issue, but nope. Today I got the same issue.

P.P.S: After further debugging it appears that the application does not seem to run permanently (now). After half an hour or so it eventually starts from scratch so the context which formerly was safe in my menu is gone. I'm just preparing to save the context in the preferences but a confirmation would be helpful.

0 Answers
Related