Skip to content

Give Debug builds their own bundle identifier - #1927

Open
AkiyamaKunka wants to merge 1 commit into
rxhanson:mainfrom
AkiyamaKunka:fix/debug-bundle-id
Open

AkiyamaKunka wants to merge 1 commit into
rxhanson:mainfrom
AkiyamaKunka:fix/debug-bundle-id

Conversation

@AkiyamaKunka

@AkiyamaKunka AkiyamaKunka commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1920.

  • The Debug configuration of the Rectangle target now uses com.knollsoft.Rectangle.debug, so a build from Xcode gets its own Accessibility grant and preferences instead of fighting the installed app over one. Release is unchanged, so the CI archive and Sparkle updates keep com.knollsoft.Rectangle.
  • ApplicationToggle.frontAppId starts from Bundle.main.bundleIdentifier instead of the release id literal.
  • The config export keeps the canonical com.knollsoft.Rectangle, so a config exported from a Debug build imports into the release. A test pins this, and another pins the Debug id so a pbxproj merge can't silently revert it.
  • Removes the unused AppDelegate.launcherAppId.
  • README: a developer note about the .debug identifier for defaults and tccutil, and to quit the installed copy while running a Debug build, since both would respond to the same shortcuts and drags.

Side benefit: the test target is hosted in the Debug app, so until now the suite's UserDefaults writes landed in the installed Rectangle's preferences. Locally, the full suite (604 tests) passes, ~/Library/Preferences/com.knollsoft.Rectangle.plist came out byte-for-byte unchanged, and the installed Rectangle kept its grant and snapped normally afterwards.

As discussed, both builds register rectangle://. There's also an empty "Copy Files → Contents/Library/LoginItems" build phase left over from the launcher; I left it alone to keep the project diff to one line, but can remove it here if you'd like.

A build from Xcode and the installed Developer ID release both used
com.knollsoft.Rectangle, so they shared one Accessibility grant and one
preferences domain: whichever copy macOS had trusted first kept the grant,
and the other showed the row enabled while still asking for permission.

The Debug configuration now uses com.knollsoft.Rectangle.debug. Release
(and therefore archives, CI and Sparkle updates) is unchanged.

- ApplicationToggle.frontAppId starts from Bundle.main.bundleIdentifier
  instead of the release id literal.
- The exported config keeps the canonical com.knollsoft.Rectangle.
- Remove AppDelegate.launcherAppId, unused since the launcher was dropped.
- README: note the Debug identifier for defaults/tccutil.
- Tests pin both identifiers.

Because the test target is hosted in the Debug app, the suite's
UserDefaults writes now go to the .debug domain instead of the installed
app's preferences.

Fixes rxhanson#1920.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant