A professional-grade metronome with CoreHaptics and uninterruptible Apple Watch background execution. Designed for progressive metal guitarists who need sharp, tactile cues.
π Web Demo: haptic.thegridbase.com
- Uninterrupted Watch Haptics - Uses HKWorkoutSession to keep vibrating even when wrist is lowered
- High-Precision Timing - DispatchSourceTimer prevents drift during long sessions
- CoreHaptics Transient Patterns - Sharp, percussive taps (not generic vibrations)
- Prog-Metal Ready - 7/8, 11/8, 13/16 and custom accent patterns
- iPhone β Watch Sync - Real-time BPM synchronization
- Digital Crown - Adjust BPM by rotating the crown
- Open Xcode 15+
- File β New β Project
- Select "iOS App" with Watch App companion
- Configure:
- Product Name:
Haptic - Team: Your Apple Developer Team
- Organization Identifier:
com.yourname - Interface: SwiftUI
- Language: Swift
- β Include Watch App (with Watch App for watchOS 10)
- Product Name:
Replace the generated files with the files from this repository:
Haptic/ β Your Xcode project's main target
HapticWatch Extension/ β Your Xcode project's watch extension
- Select iOS target β Signing & Capabilities
- Add: HealthKit (for workout session sync awareness)
- Add: Background Modes β β Audio, AirPlay, and Picture in Picture
- Select Watch target β Signing & Capabilities
- Add: HealthKit
- Add: Background Modes β β Workout processing
<key>NSHealthShareUsageDescription</key>
<string>Haptic uses HealthKit to maintain metronome sync with Apple Watch during workouts.</string><key>NSHealthShareUsageDescription</key>
<string>Haptic needs workout access to keep the metronome running in background.</string>
<key>WKBackgroundModes</key>
<array>
<string>workout-processing</string>
</array>- CoreHaptics doesn't work on Simulator
- Watch background mode requires real hardware
- Use your iPhone + Apple Watch pair
- BPM display shows correctly
- Tap BPM number for tap tempo
- +1/-1/+10/-10 buttons work
- Beat sequencer shows correct number of beats
- Tap beats to toggle accent (blue dot appears)
- Time signature picker opens
- Play button starts metronome
- Current beat highlights green/blue
- Haptic feedback on each beat
- BPM syncs from iPhone
- Digital Crown adjusts BPM
- Play/Stop works
- Beat indicators pulse
- CRITICAL: Lower wrist - haptics should CONTINUE
- CRITICAL: Turn screen off - haptics should CONTINUE
- Workout icon appears when playing (HKWorkoutSession active)
- Change BPM on iPhone β Watch updates
- Change BPM on Watch β iPhone updates
- Start on iPhone β Watch shows playing state
- Stop on Watch β iPhone shows stopped state
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β iPhone β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β MetronomeView (SwiftUI) β
β β β
β MetronomeManager (Timing Engine) β
β β β
β HapticEngine (CoreHaptics) β
β β β
β WatchSyncManager βββββ WCSession βββββ Watch β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Apple Watch β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β WatchMetronomeView (SwiftUI) β
β β β
β WorkoutSessionManager (HKWorkoutSession) β
β β Keeps app alive in background β
β MetronomeManager (Timing Engine) β
β β β
β HapticEngine (CoreHaptics / WKInterfaceDevice fallback) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Ensure WorkoutSession is starting (check for workout icon)
- Verify HealthKit authorization was granted
- Check Background Modes capability includes "workout-processing"
- Both devices must be on same iCloud account
- Watch must be paired with iPhone
- Try: Settings β General β Reset β Reset Sync Data
- This shouldn't happen (we use mach_absolute_time)
- If it does, check CPU throttling on device
MIT License - Use freely for your projects.
Can Kilic
- Portfolio: cankilic.com
- GitHub: @cankilic-gh