FocusPulse is a native, lightweight macOS focus and Pomodoro timer application built with SwiftUI, SwiftData, and Swift Charts.
- Focus & Break Timer: Customizable work intervals, short breaks, and long breaks with real-time circular progress visualization.
- Task Management: Create, edit, and organize tasks linked directly to focus sessions.
- Points & Wishlist: Earn points from focus sessions and redeem them for self-defined rewards. Includes daily bonus, undo redemption, and clear progress feedback.
- Menu Bar Integration: Persistent menu bar status icon and dropdown for quick timer monitoring and controls.
- Global Hotkeys: Quick start and control the timer from anywhere.
- Session History & Analytics: Detailed session logs with manual adjustments, plus interactive charts (weekly focus distribution, monthly trends, task breakdowns, streak metrics) powered by Swift Charts.
- Native macOS Experience:
- Pure local persistence via SwiftData (no cloud account required).
- Local notifications and audio cues upon session completion.
- Keyboard shortcuts for common actions.
- Seamless Light and Dark mode appearance.
- Accessibility labels and VoiceOver support.
- UI Framework: SwiftUI & Swift Charts
- Persistence: SwiftData
- Language: Swift 6
- Target OS: macOS 14.0+ (Sonoma or later)
- Project Configuration: XcodeGen (
project.yml)
- Deployment Target: macOS 14.0+
- Toolchain: Swift 6 compatible toolchain
- Verified with: macOS, Xcode 26.6, Swift 6.3.3
Open FocusPulse.xcodeproj in Xcode, select the FocusPulse scheme with a macOS destination, and click Run (⌘R).
xcodebuild -project FocusPulse.xcodeproj -scheme FocusPulse -destination "platform=macOS,arch=arm64" clean buildIf you have XcodeGen installed, you can regenerate FocusPulse.xcodeproj from project.yml:
xcodegen generateRun the full unit test suite via xcodebuild:
xcodebuild -project FocusPulse.xcodeproj -scheme FocusPulse -destination "platform=macOS,arch=arm64" clean testLocal Debug/Release builds use ad-hoc signing so Hardened Runtime and entitlements apply without a paid certificate. App Sandbox stays disabled.
Outside the Mac App Store, Gatekeeper requires a Developer ID Application signature plus Apple notarization. The repo does not contain a Team ID or secrets.
# 1. Check configuration and credential checklist (no certificate required)
./scripts/build_and_notarize.sh --check
# 2. Store notary credentials once (recommended)
xcrun notarytool store-credentials "FocusPulse-notary" \
--apple-id "you@example.com" \
--team-id "ABCD123456"
# 3. Archive, sign, notarize, and staple
export DEVELOPMENT_TEAM="ABCD123456"
export NOTARY_KEYCHAIN_PROFILE="FocusPulse-notary"
./scripts/build_and_notarize.shYou will need:
| Item | Purpose |
|---|---|
| Apple Developer Program membership | Required for Developer ID and notarization |
| Team ID | DEVELOPMENT_TEAM / notarytool --team-id |
| Developer ID Application certificate + private key | Distribution signing (not Apple Development) |
| App-specific password, notarytool keychain profile, or App Store Connect API key | notarytool authentication |
Xcode command-line tools (notarytool, stapler, codesign) |
Build and notarization toolchain |
Outputs: dist/FocusPulse.app and dist/FocusPulse.zip (stapled).
Sources: Notarizing macOS software, Customizing the notarization workflow, Hardened Runtime.
Latest release: v2.1
Download: FocusPulse-2.1.zip
FocusPulse is an open-source macOS application. Local builds are ad-hoc signed; Developer ID + notarization remains optional for wider distribution.
FocusPulse is released under the MIT License.
FocusPulse 是一款基于 SwiftUI、SwiftData 与 Swift Charts 构建的原生轻量级 macOS 专注与番茄钟应用。
- 专注与休息计时器:支持自定义专注时长、短休息与长休息,提供直观的实时环形进度可视化。
- 任务管理:支持创建、编辑与管理任务,专注会话可直接与具体任务关联。
- 积分与愿望单:通过专注赚取积分,兑换自己设定的奖励。支持每日奖励、撤销兑换与清晰的进度反馈。
- 菜单栏常驻:原生 Menu Bar 状态图标与快捷弹窗,方便随时查看进度与控制计时器。
- 全局快捷键:随时快速启动与控制计时器。
- 历史记录与统计分析:提供完整的专注历史记录与手动编辑能力,并基于 Swift Charts 提供周分布、月趋势、任务分类统计及连续专注天数(Streak)图表。
- 原生 macOS 体验:
- 基于 SwiftData 的全本地数据存储(无需云端账号)。
- 会话完成时的本地系统通知与音效提示。
- 支持常用操作的键盘快捷键。
- 自动适配浅色与深色模式(Light / Dark Appearance)。
- 完备的 VoiceOver 与无障碍辅助功能支持。
- 界面框架:SwiftUI & Swift Charts
- 数据持久化:SwiftData
- 开发语言:Swift 6
- 目标平台:macOS 14.0+ (Sonoma 及以上)
- 工程管理:XcodeGen (
project.yml)
- 系统要求:macOS 14.0+
- 工具链要求:支持 Swift 6 的开发环境
- 已验证环境:macOS、Xcode 26.6、Swift 6.3.3
在 Xcode 中打开 FocusPulse.xcodeproj,选择 FocusPulse Scheme 和 macOS 目标设备,按快捷键 ⌘R 运行。
xcodebuild -project FocusPulse.xcodeproj -scheme FocusPulse -destination "platform=macOS,arch=arm64" clean build如已安装 XcodeGen,可通过 project.yml 重新生成 FocusPulse.xcodeproj:
xcodegen generate使用 xcodebuild 运行完整的单元测试套件:
xcodebuild -project FocusPulse.xcodeproj -scheme FocusPulse -destination "platform=macOS,arch=arm64" clean test本地 Debug/Release 使用 ad-hoc 签名,以便在无付费证书时仍应用 Hardened Runtime 与 entitlements。App Sandbox 必须保持关闭。
Mac App Store 之外的分发需要 Developer ID Application 签名和 Apple 公证。仓库不包含 Team ID 或密钥。
# 1. 检查配置与凭证清单(不需要证书)
./scripts/build_and_notarize.sh --check
# 2. 一次性写入公证凭证(推荐)
xcrun notarytool store-credentials "FocusPulse-notary" \
--apple-id "you@example.com" \
--team-id "ABCD123456"
# 3. 归档、签名、公证并 staple
export DEVELOPMENT_TEAM="ABCD123456"
export NOTARY_KEYCHAIN_PROFILE="FocusPulse-notary"
./scripts/build_and_notarize.sh需要准备:
| 项目 | 用途 |
|---|---|
| Apple Developer Program 会员资格 | Developer ID 证书与公证的前提 |
| Team ID | DEVELOPMENT_TEAM / notarytool --team-id |
| Developer ID Application 证书及私钥 | 分发签名(不是 Apple Development) |
| App-Specific Password、notarytool Keychain profile,或 App Store Connect API Key | notarytool 鉴权 |
Xcode 命令行工具(notarytool、stapler、codesign) |
构建与公证工具链 |
产物:dist/FocusPulse.app 与已 staple 的 dist/FocusPulse.zip。
参考:公证 macOS 软件、自定义公证流程、Hardened Runtime。
最新版本:v2.1
下载:FocusPulse-2.1.zip
FocusPulse 为开源 macOS 应用。本地构建为 ad-hoc 签名;Developer ID + 公证仍为可选的更广泛分发方式。
FocusPulse 采用 MIT 许可证。