- macOS 14.0 (Sonoma) or later
- Xcode 15.0 or later
- An Apple Developer account (for distribution)
cd /path/to/eyebreak
open EyeBreak.xcodeproj- Select the EyeBreak target in Xcode
- Go to "Signing & Capabilities"
- Select your development team
- Xcode will automatically generate a bundle identifier
- Press ⌘R to build and run
- Or use Product > Run from the menu
EyeBreak/
├── EyeBreakApp.swift # Main app entry point
├── Models/
│ ├── TimerState.swift # Timer state management
│ └── Settings.swift # User settings
├── Managers/
│ ├── BreakTimerManager.swift # Core timer logic
│ ├── IdleDetector.swift # Activity monitoring
│ ├── NotificationManager.swift # Notification handling
│ └── ScreenBlurManager.swift # Screen overlay management
├── Views/
│ ├── MenuBarView.swift # Menu bar popover
│ ├── SettingsView.swift # Settings panel
│ ├── BreakOverlayView.swift # Break screen overlay
│ ├── OnboardingView.swift # First launch experience
│ └── StatsView.swift # Statistics display
├── Info.plist # App configuration
└── EyeBreak.entitlements # App capabilities
The app requires these permissions to function:
- Requested automatically on first launch
- Used for break reminders
- Required for screen blur feature
- Can be granted in System Settings > Privacy & Security > Screen Recording
- If denied, the app will show notification-only breaks
- Test on multiple displays to ensure overlay works correctly
- Test idle detection by leaving the Mac idle for >5 minutes
- Test sleep/wake cycle behavior
- Verify notification permissions work correctly
Enable verbose logging by adding to EyeBreakApp.swift:
init() {
print("EyeBreak starting...")
#if DEBUG
UserDefaults.standard.set(true, forKey: "debugMode")
#endif
}xcodebuild -project EyeBreak.xcodeproj -scheme EyeBreak -configuration Debug- Archive the app (Product > Archive)
- In Organizer, select your archive
- Click "Distribute App"
- Choose "App Store Connect"
- Follow the prompts to upload
- Archive the app
- Choose "Developer ID" distribution
- Export the app
- Notarize with Apple:
xcrun notarytool submit EyeBreak.zip \
--apple-id your@email.com \
--team-id TEAMID \
--password your-app-specific-password- Staple the notarization:
xcrun stapler staple EyeBreak.app- Check that
LSUIElementis set totruein Info.plist - Verify the app is running (check Activity Monitor)
- Grant Screen Recording permission in System Settings
- Restart the app after granting permission
- Ensure idle detection is enabled in Settings
- Check that IOKit framework is properly linked
- Clean build folder (⌘⇧K)
- Delete DerivedData:
rm -rf ~/Library/Developer/Xcode/DerivedData - Restart Xcode
MIT License - See LICENSE file for details