- macOS with Xcode 14+
- Python 3.9+
- iOS device (not simulator, for network access)
- Local WiFi network
cd YTAudioSystem/backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txtRun the setup script to generate OAuth credentials:
python setup_oauth.pyThis will:
- Open a browser for Google authentication
- Save credentials to
oauth.json - Enable personalized search and recommendations
Note: Keep oauth.json private - it contains your authentication tokens.
python server.pyServer will start on http://0.0.0.0:8080
To run on a specific IP (for device testing):
HOST=192.168.1.100 python server.pyEdit ios/YTAudioPlayer/Sources/APIService.swift:
private let baseURL = "http://x.x.x.x:8080"Replace YOUR_MAC_IP with your Mac's local IP (find it in System Preferences > Network).
cd YTAudioSystem/ios
open YTAudioPlayer.xcodeproj- Select project in Xcode
- Choose your development team
- Set bundle identifier (e.g.,
com.yourname.ytaudioplayer)
- Select your iOS device (not simulator)
- Press Run
- Accept trust prompt on device
Allow port 8080 through macOS Firewall:
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add $(which python)Or disable firewall temporarily for testing:
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate offEnsure both devices are on the same WiFi network. No port forwarding needed for local LAN.
- Verify backend is running:
curl http://localhost:8080/ - Check IP address is correct in APIService.swift
- Ensure devices are on same network
- Try accessing from iOS Safari:
http://YOUR_MAC_IP:8080/
- Check Info.plist has
UIBackgroundModeswithaudio - Ensure audio session is configured:
AVAudioSession.Category.playback - Check Control Center shows the track
If oauth.json expires or fails:
rm oauth.json
python setup_oauth.pyDownloads are processed in memory before saving. For long tracks, this may use significant RAM. The Python backend streams to disk to minimize this.
- Search: Enter song/artist in Search tab
- Stream: Tap play button to stream immediately
- Download: Tap download button to save to backend library
- Library: View downloaded tracks in Library tab
- Play Local: Tap play on library tracks (streams from backend storage)
- Downloads:
~/Music/YTAudio/ - OAuth:
backend/oauth.json - Logs: Console output
- No local file storage (streaming only)
- Settings: Standard iOS app storage