The first release hardened by a real sandboxed consumer — integration-tested
inside a sandboxed menu-bar app, which surfaced three real bugs, all fixed here.
Fixed
- Sandbox-safe relaunch.
quitAndReopen()spawned a detached/bin/shhelper, which the App Sandbox forbids — sandboxed apps quit and never relaunched. Sandboxed apps now relaunch via LaunchServices (NSWorkspace.openApplication,createsNewApplicationInstance), terminating only once the new instance is underway; on failure they stay running. Non-sandboxed behavior is unchanged. Sandboxed apps markedLSMultipleInstancesProhibited(no relaunch path exists) stay running — the grant applies on the next manual restart. - Reliable sandbox detection. The
APP_SANDBOX_CONTAINER_IDenv var is not reliably present in sandboxed processes; detection now reads thecom.apple.security.app-sandboxentitlement from the process's own code signature (SecTaskCopyValueForEntitlement), with a container-home fallback. Every relaunch path logs via os.log (subsystemPermissionPilot, categoryrelaunch) so field failures are diagnosable withlog show. - "Open the … list" always opens the pane. The manual-add walkthrough's step-1 button called
request()— for Accessibility that's the one-shot AX prompt, so every later click was a silent no-op. It now deep-links to the pane, and the Accessibility request path also falls back to opening the pane when the prompt is spent (mirroring Screen Recording). - Wizard stays visible after a quit-and-reopen handoff (
orderFrontRegardless()— cooperative activation on macOS 14+ can deny activation right after the old instance exits).
Added
OnboardingPresenter.front()— deminiaturize + re-front an already-presented wizard.PermissionManager.relaunchAvailable— false when no relaunch path exists (sandboxed +LSMultipleInstancesProhibited); the relaunch banner hides its "Quit & Reopen" button instead of rendering a dead control.OnboardingConfiguration.showsWelcomeStep/showsDoneStep(omit wizard screens) andcolorScheme(pin light/dark).- Localization — every user-facing string is translatable (English base; add a
<lang>.lprojper target). - Downloadable demo installers (
.pkgrecommended,.dmgalternative), README visuals, CI, CHANGELOG/CONTRIBUTING. - Regression tests for the relaunch decisions (33 tests total).
Install
.package(url: "https://github.com/arpitagarwal1301/PermissionPilot.git", from: "0.2.0")Full details in the CHANGELOG.