Kap icon indicating copy to clipboard operation
Kap copied to clipboard

MacOS M1 CPU Screen Recording Permission Issue [Fix]

Open codercodingthecode opened this issue 5 months ago • 0 comments

MacOS M1 CPU Screen Recording Permission Issue [Fix]

Issue

Many users have reported screen permission issues on M1 Macs, with some resorting to installing Rosetta despite using an M1-specific build. The root cause is that the node package used to request permissions is based on Intel architecture, thus requiring Rosetta on M1 chips.

Solution

I've made the following modifications to resolve this issue:

  1. Upgraded Node.js version to 16 to use M1 APIs natively.
  2. Removed the Intel-dependent library mac-screen-capture-permissions.
  3. Utilized Electron's native API support for permission requests.

These changes allow the app to request and use screen recording permissions on M1 Macs without the Rosetta workaround.

Implementation Details

  1. Updated package.json to use Node.js 16.
  2. Removed mac-screen-capture-permissions from dependencies.
  3. Modified the screen capture permission code to use Electron's systemPreferences API:

Application

I've built the release version of the app with these changes, and it's available in the release section of my forked repository.

  1. Download the zipped app from release.
  2. Unzip and move it to the Applications folder.
  3. Grant the necessary permissions.
  4. Launch the app and verify that screen recording works without Rosetta.

This solution should allow Kap to function natively on M1 Macs without any Intel-based dependencies for screen recording permissions.

https://github.com/codercodingthecode/Kap/releases/tag/m1-permission

If there is an interest from the maintainers, I can open a pr with these changes to the main project.

image

Kapture 2024-09-20 at 13 39 14

codercodingthecode avatar Sep 20 '24 19:09 codercodingthecode