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