Enabling Accessibility permissions for a macOS application in development

September 27, 2025

Enabling Accessibility permissions for a macOS application in development

Language
en
Tags
Accessibility
macOS
Debug
Xcode
번역 대기
번역 대기
Authors
Jaewan Shin
Published
September 27, 2025
Use Original Cover Image
Type
Post
Children

Step 1: Configure Xcode to find the app bundle

notion image
Each time you build and run your project in Xcode, it creates a new application bundle. The location can be randomized, which makes granting a persistent permission difficult. To fix this, you should set a consistent build location.
  1. With your project open, select File > Project/Workspace Settings from the menu bar.
  1. Under the Derived Data section, change the build location to "Workspace-relative location".
  1. Click Done.
 

Step 2: Grant Accessibility permission in System Settings

After you have configured your build path, run your app at least once from Xcode. This creates the app bundle that you will now grant permission to.
  1. Open System Settings (or System Preferences on older macOS versions).
  1. Navigate to Privacy & Security > Accessibility.
  1. Click the padlock icon at the bottom and enter your password to make changes.
  1. Click the + button under the list of applications to add a new app.
  1. In the file browser that appears, navigate to your project's directory. Go to DerivedData/YourProjectName/Build/Products/Debug/.
  1. Select your application bundle (e.g., YourAppName.app) and click Open.
  1. Find your app in the list and ensure the checkbox next to it is checked.
  1. Restart your app from Xcode, and it should now have the necessary permissions.