1.0 KiB
1.0 KiB
Run+ Sync (MVP)
This is a minimal SwiftUI + MultipeerConnectivity prototype to sync local MP3 playback across iPhones. One device hosts and controls playback; peers join, receive the track file, and then sync playback.
Setup (Xcode)
- Create a new iOS App project in Xcode (SwiftUI, iOS 17+ or latest).
- Replace the generated Swift files with the files in
RunPlus/. - Add these keys to your app's
Info.plist:NSLocalNetworkUsageDescription= "Sync audio with nearby runners"NSBonjourServices(Array) with_runplus-sync._tcpNSBluetoothAlwaysUsageDescription= "Find nearby runners"
How It Works
- Host taps Host, peers tap Join.
- Host imports an MP3 via Import MP3, then taps Send Track to push it to peers.
- Host taps Play to broadcast a shared start time.
- Host can tap Sync Now for a quick clock sync.
Notes
- This is a prototype using
AVAudioEnginehost-time scheduling plus uptime-based sync. It is good enough for group runs, but not sample-accurate.