Skip to content

Development builds collide with the installed app's accessibility grant; Authorize window can't explain it #1920

Closed

Description

@AkiyamaKunka

Environment: macOS 27.0.1, Rectangle 2.0.3 (110) from the DMG, plus a Debug build of main from Xcode 27.

What happens

macOS ties the accessibility grant to the app's code signature, and both copies use the bundle identifier com.knollsoft.Rectangle. The DMG build is signed with your Developer ID; a contributor's local build is ad-hoc signed (or signed by a different team). Whichever copy is granted first owns the "Rectangle.app" row in System Settings → Privacy & Security → Device Control and Data Access; the other copy then shows the row toggled on but keeps presenting the Authorize window, and toggling the row does nothing. The README's reset sequence (disable, remove with −, restart, relaunch) fixes it, which is how I got out of it.

You never see this because a Debug build signed by your own team satisfies the same requirement as the release. It bites anyone who builds from source alongside the installed app, which the contributing docs encourage.

Two small changes I'd like to make, if you're open to them

  1. Give Debug builds their own identifier, e.g. com.knollsoft.Rectangle.debug on the Debug configuration only, so a development build keeps a separate grant and separate defaults instead of fighting the installed app. Only three places hardcode the string (ApplicationToggle.frontAppId, the Config export, the launcher id), and they can use Bundle.main.bundleIdentifier where they mean "this app". Known side effect: both builds register the rectangle:// scheme; the config export would keep the canonical id.
  2. One hint line in the Authorize window (AccessibilityView.swift): if Rectangle already appears enabled in the list, remove it with the − button and relaunch. The window is where people are stuck; the README has the steps but nobody looks there first.

Happy to do either or both as a PR; which would you accept?

Activity

  1. rxhanson commented on Oct 18, 2026

    @rxhanson
    Owner

    Thanks, I appreciate you taking the time to dig into this, and would accept a PR.

    Option 1 sounds good to me.

    launcherAppId can be removed altogether. I forgot to remove it v2.0 when the minimum macOS version went up to 14, thereby removing the need for the launcher for start-on-login functionality.

    I think the side effects are acceptable. There might be a way to work around this with a different scheme, although that could add complexity that's not worth the tradeoff.

    Since this is a developer-facing issue, if you implement option 2 it should be behind a #if DEBUG compiler directive, although option 2 would be unnecessary with option 1 implemented, right?

  2. AkiyamaKunka commented on Oct 18, 2026

    @AkiyamaKunka
    ContributorAuthor

    Right, with option 1 a development build can no longer collide with the installed app, so I left option 2 out. PR: #1927 (it also removes launcherAppId).

    One case it doesn't cover, in case it's useful: the DMG that the CI workflow builds for each PR is a Release archive re-signed ad hoc, so it still carries com.knollsoft.Rectangle. Someone testing a PR build next to the installed release will still hit this. Happy to look at that separately if you think it's worth it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions