8

I have a simple Cocoa app with a single NSWindow where I can enter some credentials and after the submission the app starts an another process. In case the credentials were entered once and cached I would like to start the process by running the app without showing the app's main window. How can I achieve that?

The app has only one class that conforms to NSApplicationDelegate and one .xib file.

Don Grem
  • 1,257
  • 3
  • 17
  • 25

2 Answers2

7

Is your window created from a xib file? There should be a "Visible at launch" checkbox in the properties for the window.

You'll need some other UI (such as a menu item) to start your work going — or you could put that in applicationDidFinishLaunching:.

Amy Worrall
  • 16,250
  • 3
  • 42
  • 65
2

In your MainMenu.xib file, select the window and uncheck "Visible at launch". I believe this is all you need to do.

Joshua Nozzi
  • 60,946
  • 14
  • 140
  • 135
  • Do you know how can I set that programmatically? Until credentials are not cached I need to display it. – Don Grem Nov 29 '11 at 20:28