This message has started appearing in the Xcode console when I test run my app, I think after the 13.3 macOS update, or the associated Xcode update.
This message is posted:
- when the app launches (my code does not do anything with the app window).
- when I right click the app window to open a contextual menu while the application is in the background.
- when I click a button on the window with the cmd key pressed, while the app is in the background.
I don't see why a warning should be posted in these situations. It looks like log noise to me.
EDIT: this warning is posted even when testing the template Mac app (objective-C, xib) with no additional code. This is on Xcode Version 14.3 (14E222b)
I started seeing same warnings but they weren't there before. Not sure if some behaviour on macOS changed or is just noise, but to on the safe side I changed my implementation to open the first window on my app.
The key is to use orderFrontRegardless()
instead of makeKeyAndOrderFront(nil)
Example
func applicationDidFinishLaunching(_: Notification) {
let window = Window()
window.makeKey()
window.orderFrontRegardless()
}