How do I include a macOS (AppKit) app extension in a Mac Catalyst app?
Generated on 7/30/2024
1 search

This post is brought to you by Tailscan,
the best devtool for Tailwind CSS.
To include a macOS (AppKit) app extension in a Mac Catalyst app, you can follow these general steps:
-
Create a New Target for the Extension:
- Navigate to the file menu in Xcode and select "New Target".
- Choose the platform for the extension, in this case, macOS.
- Search for the appropriate extension template, such as a Core Spotlight delegate extension.
- Configure the new target and add it to your project.
-
Activate and Implement the Extension:
- Activate the new extension and implement the necessary functionality.
- For example, if you are creating a Core Spotlight delegate extension, you would implement the delegate methods to handle indexing requests.
-
Build and Debug the Extension:
- Select the app's target and build the app to include the new extension.
- Switch to the extension target and attach to the process for debugging.
- Use tools like
mdutil
to simulate requests and test the extension.
For a detailed demonstration on creating an index delegate extension, you can refer to the Support semantic search with Core Spotlight session.
Relevant Sessions
If you need more specific guidance or have additional questions, feel free to ask!

What’s new in device management
Learn about the latest management capabilities for iOS, iPadOS, macOS, and visionOS, then discover the latest changes to Apple Business Manager and Apple School Manager. We’ll also share updates to Activation Lock, SoftwareUpdate, and Safari management.

Support semantic search with Core Spotlight
Learn how to provide semantic search results in your app using Core Spotlight. Understand how to make your app’s content available in the user’s private, on-device index so people can search for items using natural language. We’ll also share how to optimize your app’s performance by scheduling indexing activities. To get the most out of this session, we recommend first checking out Core Spotlight documentation on the Apple Developer website.

What’s new in AppKit
Discover the latest advances in Mac app development. Get an overview of the new features in macOS Sequoia, and how to adopt them in your app. Explore new ways to integrate your existing code with SwiftUI. Learn about the improvements made to numerous AppKit controls, like toolbars, menus, text input, and more.

Build a great Lock Screen camera capture experience
Find out how the LockedCameraCapture API can help you bring your capture application’s most useful information directly to the Lock Screen. Examine the API’s features and functionality, learn how to get started creating a capture extension, and find out how that extension behaves when the device is locked.

What’s new in privacy
At Apple, we believe privacy is a fundamental human right. Learn about new and improved permission flows and other features that manage data in a privacy-preserving way, so that you can focus on creating great app experiences.