When I fire up my OS X app from Xcode, it appears as it should.
When I close the window, it disappears (as you would expect), and the app still appears active on the dock.
Great, that’s how it should be. But when I click the dock to activate the window, it doesn’t show up.
Any ideas?
There isn’t much information in the question, but let me presume that the app is a single-window app (i.e., not
NSDocument-based).A typical situation in this scenario is that the user closes the window, and the appliction keeps running with the icon in the Dock as it is supposed to.
In that situation, the user would normally like the window to re-appear when the app is activated by clicking the icon in the Dock.
To obtain that, you can implement
applicationShouldHandleReopen:hasVisibleWindows:as follows: