O'Reilly logo

Swift Development with Cocoa by Tim Nugent, Jonathon Manning, Paris Buttfield-Addison

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 19. Nonstandard Apps

For the majority of this book, we’ve talked about GUI applications designed to run on either OS X or iOS. These applications receive user input via the mouse, keyboard, or touchscreen, display information via the screen, and are launched by double-clicking them on OS X or tapping them on iOS.

However, not every piece of software that you write is a traditional app. In some cases, you might want to create something that the user doesn’t need to interact with—for example, a background application that automatically downloads files from the Internet. Another case where you don’t want to build a traditional app is when you want to create a preference pane, which the user can access via the System Preferences application.

In this chapter, you’ll learn how to build apps for OS X that don’t fit the mold of standard applications. Specifically, you’ll learn how to build command-line tools (which don’t use a GUI), system preference panes, and applications that add an item to the system-wide menu bar. Finally, you’ll learn how to make apps on iOS that can use more than one screen.

Note

This chapter mostly applies to OS X only—on iOS, you can only build apps that display a graphical interface interface, and command-line tools and daemons aren’t supported.

The only exception to this is iOS Apps with Multiple Windows.

Command-Line Tools

The simplest possible application on OS X is a command-line tool. This kind of app never presents a GUI to the user, but instead sends and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required