CoopRunning 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)

  1. Create a new iOS App project in Xcode (SwiftUI, iOS 17+ or latest).
  2. Replace the generated Swift files with the files in CoopRunning/.
  3. Add these keys to your app's Info.plist:
    • NSLocalNetworkUsageDescription = "Sync audio with nearby runners"
    • NSBonjourServices (Array) with _cooprun-sync._tcp
    • NSBluetoothAlwaysUsageDescription = "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 AVAudioEngine host-time scheduling plus uptime-based sync. It is good enough for group runs, but not sample-accurate.
Description
No description provided
Readme 331 KiB
Languages
Swift 100%