21 lines
1.0 KiB
Markdown
21 lines
1.0 KiB
Markdown
# 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)
|
|
1. Create a new iOS App project in Xcode (SwiftUI, iOS 17+ or latest).
|
|
2. Replace the generated Swift files with the files in `RunPlus/`.
|
|
3. Add these keys to your app's `Info.plist`:
|
|
- `NSLocalNetworkUsageDescription` = "Sync audio with nearby runners"
|
|
- `NSBonjourServices` (Array) with `_runplus-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.
|