Take advantage of the full power of Swift through XPC. Development for macOS differs from iOS and web-based development because of multicomponent applications. Besides the usual GUI-based applications and app extensions, there are a wide range of daemonsprocesses that run in the backgroundto worry about. These include system monitoring, event listening, notification agents, and many-many more.
First, you''ll take a tour around different types of daemons: user agents, privileged helpers, login items, XPC services, and System Extensions. Knowing key specifics of the daemons will open a wide range of possibilities from non-trivial application development to system development. You''ll find lots of examples, working code samples, and even ready-to-use utilities. The book will guide you step-by-step through preparation, registration, and management of all kinds of daemons.
System Extensions are brand new for macOS and open additional powerful feat
Table of ContentsPart 1. Daemons: Overview & ManagementChapter 1. Daemons at a Glance
The operating system background world
Different types of daemons
Chapter 2. launchd and launchd Jobs
launchd functional related to daemons
Daemons' configuration (.plist files).
Chapter 3. launchctl
Setup and manage daemons
launchctl tool in detail
Swift API for daemons management
Part 2. Daemons in Detail
Chapter 4. Choose the right daemon for you
Comparing daemon types
Picking a daemon type based on needs
Chapter 5. Classic Daemons
What is a classic daemon?
Root background processes
Chapter 6. User Agents
Specifics of user agents
User background processes
Chapter 7. XPC Services
The Simplest daemon
Working with XPC services
Chapter 8. Privileged Helpers
Special daemons
The official and modern way of privilege escalation in macOS
Chapter 9. Login Items
User Agent LoginItem
APIs related to LoginItem
Chapter 10. System Extensions (since macOS 10.15)
Brand new daemon types
System Extension
EndpointSecurity.framework
Required entitlements
Specific installation
Management
Part 3. Talking to Daemons
Chapter 11. XPC Communication
Examples of XPC communication between processes
Corner cases
Passing objects by-proxy
Using NSProgress within XPC
Other details
Chapter 12. XPC Security
Notes and recommendations
Securing XPC communication between processes
Code signing
Chapter 13. XPC and Swift
Adopting XPC communication to Swift
Passing structures over XPC
Working with callbacks instead of delegates
Part 4. Specifics and Nuances
Chapter 14. UserAgents and Sandboxs (AppStore compatible)
Use UserAgents as part of sandboxed applications
AppStore compatibility