explaingit

jonluca/node-mac-permissions

Analysis updated 2026-07-06 · repo last pushed 2023-04-18

Objective-C++Audience · developerComplexity · 2/5DormantSetup · moderate

TLDR

A library that lets JavaScript developers check and request macOS system permissions (camera, microphone, contacts, files, etc.) without writing native Apple code.

Mindmap

mindmap
  root((repo))
    What it does
      Check permission status
      Trigger permission prompts
      Open System Preferences
    Tech stack
      Objective-C++
      Node.js
      JavaScript
    Use cases
      Video conferencing apps
      Calendar sync tools
      File access tools
    Audience
      Electron developers
      Node.js desktop devs
      macOS app builders
    Limitations
      Needs usage descriptions
      Terminal app required
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Request camera and microphone access before a video call starts in an Electron conferencing app.

USE CASE 2

Ask for Calendar permission in a Node.js calendar synchronization tool.

USE CASE 3

Check if the user has granted access to Contacts before attempting to read them.

USE CASE 4

Open System Preferences to let the user enable Full Disk Access for your app.

What is it built with?

Objective-C++Node.jsJavaScript

How does it compare?

jonluca/node-mac-permissionsgoogle/santakhronosgroup/moltenvk
Stars4,5155,621
LanguageObjective-C++Objective-C++Objective-C++
Last pushed2023-04-18
MaintenanceDormant
Setup difficultymoderatehardhard
Complexity2/54/54/5
Audiencedeveloperops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires a compatible terminal app (not the default macOS Terminal) for permission prompts, and developers must add Apple usage description strings to their app config or prompts will crash.

No license information was provided in the explanation, so the permissions for using this code are unknown.

In plain English

If you're building a desktop app for macOS, you've likely hit the wall of system permissions. Modern macOS requires explicit user approval before an application can touch things like the camera, microphone, contacts, calendar, or files in the Desktop and Documents folders. This project gives developers a straightforward way to handle those permission requests from JavaScript code, rather than wrestling with Apple's native languages. The library provides two main capabilities. First, you can check the current permission status for a specific resource, whether the user has already granted access, denied it, or hasn't been asked yet. Second, you can trigger the actual permission prompt that the user sees. For most resources like the microphone or camera, calling the appropriate function pops up the standard macOS dialog asking the user for permission. For a few things like Full Disk Access, where Apple doesn't allow apps to prompt directly, it opens the relevant System Preferences pane so the user can toggle the setting themselves. This would be useful for anyone building an Electron app or a Node.js desktop tool on macOS. For example, if you're building a video conferencing app, you'd use this to request camera and microphone access before a call starts. If you're building a calendar sync tool, you'd use it to ask for Calendar access. It covers the full range of macOS privacy-protected resources: contacts, reminders, photos, screen capture, speech recognition, input monitoring, and protected folders. One important detail: Apple requires apps to explain why they need each permission. Developers must include a text explanation in their app's configuration file for each resource they want to access, otherwise the permission request will crash rather than prompt. The library handles the prompting logic, but the usage descriptions are the developer's responsibility. The library is written in Objective-C++ because it needs to call directly into macOS's native security and privacy APIs. It wraps those native calls into simple JavaScript functions that return promises, so developers can write async/await-style code without dealing with the underlying system complexity. Note that running it as a plain Node.js script requires a compatible terminal app, the standard macOS Terminal won't work for permission prompts.

Copy-paste prompts

Prompt 1
I'm building an Electron video call app on macOS. Help me write a function that checks and requests camera and microphone permissions using node-mac-permissions before joining a call, and handles the case where access was denied.
Prompt 2
Using node-mac-permissions, write a Node.js script that checks the current permission status for Contacts, Calendar, and Reminders, and only requests the ones that haven't been asked yet.
Prompt 3
Help me set up the required Apple usage description strings in my Electron app's Info.plist so node-mac-permissions prompts don't crash when requesting Photos and Speech Recognition access.
Prompt 4
Write a helper function using node-mac-permissions that opens the Full Disk Access System Preferences pane and guides the user to enable it, since direct prompting isn't allowed.

Frequently asked questions

What is node-mac-permissions?

A library that lets JavaScript developers check and request macOS system permissions (camera, microphone, contacts, files, etc.) without writing native Apple code.

What language is node-mac-permissions written in?

Mainly Objective-C++. The stack also includes Objective-C++, Node.js, JavaScript.

Is node-mac-permissions actively maintained?

Dormant — no commits in 2+ years (last push 2023-04-18).

What license does node-mac-permissions use?

No license information was provided in the explanation, so the permissions for using this code are unknown.

How hard is node-mac-permissions to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is node-mac-permissions for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.