A macOS menu bar app that tracks how you spend time across apps and windows, and assigns it to projects using keyword rules.
- macOS 26.3 or later
- Xcode 26.5 or later (matches the project’s
LastUpgradeCheck)
MacTrack/
├── Config/
│ └── MacTrack.xcconfig # Signing & bundle ID (edit before first build)
├── MacTrack/
│ ├── App/ # Entry point, delegate, tracking bootstrap
│ ├── Models/ # SwiftData models
│ ├── Services/ # Tracking engine, projects, settings
│ ├── Views/ # SwiftUI UI
│ ├── Utilities/ # Helpers
│ ├── Assets.xcassets/
│ └── MacTrack.entitlements
├── MacTrack.xcodeproj/
└── README.md
git clone https://github.com/YOUR_ORG/mactrack-time.git
cd mactrack-time
open MacTrack.xcodeprojSelect the MactrackTime scheme (shared scheme under MacTrack.xcodeproj/xcshareddata/xcschemes/).
Edit Config/MacTrack.xcconfig in a text editor or Xcode:
| Setting | What to put |
|---|---|
DEVELOPMENT_TEAM |
Your 10-character Apple Developer Team ID. Find it under Apple Developer → Membership or in Xcode → Settings → Accounts → your team → Team ID. Leave empty to sign with a personal Apple ID for local runs only. |
PRODUCT_BUNDLE_IDENTIFIER |
A unique reverse-DNS id, e.g. com.yourname.MactrackTime. Must not clash with another app on your Mac. |
Optional: create Config/MacTrack.local.xcconfig (gitignored) to override values without changing the committed file:
DEVELOPMENT_TEAM = ABCDE12345
PRODUCT_BUNDLE_IDENTIFIER = com.yourname.MactrackTime
// At top of Config/MacTrack.xcconfig (already included in repo):
#include? "MacTrack.local.xcconfig"
In Xcode you can also set signing on the MactrackTime target → Signing & Capabilities → Team and Bundle Identifier; keep them in sync with MacTrack.xcconfig so command-line builds match the IDE.
Press ⌘R. The app runs as a menu bar accessory (no Dock icon). Use the clock icon in the menu bar to open the popover or main window.
On first run, allow:
- Accessibility — read focused window titles via the accessibility API
- Screen Recording — fallback for apps that do not expose titles via accessibility alone
Use Open Settings in the menu bar popover if either permission is missing.
- Apple Developer Team IDs or personal bundle IDs
xcuserdata/(per-user Xcode state)- Build products (
DerivedData/,build/) - Local config overrides (
Config/MacTrack.local.xcconfig) - Time-tracking data (stored locally by SwiftData in your user Library after you run the app)
Before pushing to a public remote, check that you are not committing:
- Personal emails or credentials in git config (use
git config --localonly; never commit.git/config) - Custom bundle IDs or team IDs in source — use
Config/MacTrack.xcconfigorMacTrack.local.xcconfiginstead
MIT — see LICENSE.
