Skip to content

Building from source

Roy Padina edited this page Oct 2, 2026 · 1 revision

Building from source

No Xcode project: plain swiftc over the Swift files in the repo root.

git clone https://github.com/roypadina/SmartHiddenBar.git
cd SmartHiddenBar
./build.sh

What build.sh does

  1. Compiles *.swift with swiftc -O into build/SmartHiddenBar.app/Contents/MacOS/SmartHiddenBar.
  2. Copies Info.plist and the menu bar icons plus AppIcon.icns for the chosen icon set (SET= at the top of the script: fold-chevron, peek-strip or curtain-panel, from Assets/icons/).
  3. Signs the app with codesign.
  4. Installs to /Applications/SmartHiddenBar.app, unless that copy is running. Quit it first and rerun.

Always run the /Applications copy, never the one in build/: the allow-list only matches the LaunchServices copy (How it works).

Modes

Command Result
./build.sh Build, sign, install to /Applications.
RELEASE=1 ./build.sh Ad-hoc signed build/SmartHiddenBar.zip (for GitHub Releases and the cask), prints its SHA-256. No install.
CI=1 ./build.sh Ad-hoc compile check. No install.

Signing identities

  • Local builds use the code-signing identity named "KeyLayoutSwitcher Dev" if it exists in your keychain. A stable identity keeps the Accessibility grant across rebuilds.
  • If it is missing, the script falls back to ad-hoc (-), which changes the signature every build and re-prompts for Accessibility. To use your own identity, change ID in build.sh.
  • RELEASE=1 and CI=1 always sign ad-hoc.

Run, log and reset

open /Applications/SmartHiddenBar.app
osascript -e 'quit app "SmartHiddenBar"'
tail -f ~/Library/Logs/SmartHiddenBar.log
/Applications/SmartHiddenBar.app/Contents/MacOS/SmartHiddenBar --list   # print every item: visible/hidden, x, name

Reset a broken grant: tccutil reset Accessibility com.roypadina.SmartHiddenBar (Screen Recording: tccutil reset ScreenCapture com.roypadina.SmartHiddenBar).

Icon assets are regenerated by Assets/icons/gen.py. See Architecture for the code layout.

Clone this wiki locally