A native iOS client for PeerTube — the decentralized, federated video platform.
PeerTube Swift brings a clean, native iOS experience to the PeerTube ecosystem, supporting multiple instances, local subscriptions, and background notifications for new videos.
- Connect to PeerTube Instances
- Local Subscriptions — Subscribe to channels without creating an account; data stays on your device
- Video Playback — Native AVKit player with quality selection and Picture-in-Picture
- Background Notifications (wip) — Get notified when subscribed channels post new videos
- Offline-First — Local caching of subscriptions and metadata
- Privacy-Focused — No mandatory login; PostHog analytics are optional (wip)
- SwiftUI — Modern declarative UI framework
- The Composable Architecture (TCA) — Unidirectional data flow and testable state management
- TubeSDK — PeerTube API client library
- SQLite.swift — Local database for subscriptions and caching
- PostHog — Optional analytics integration
App/PeerTubeSwift/PeerTubeSwift/
├── App.swift # App entry point and configuration
├── PeerTubeSwiftApp.swift # Main app with PostHog & background tasks
├── Views/
│ ├── Feed.swift # Main feed view
│ ├── VideoDetails.swift # Video detail page
│ ├── VideoChannel.swift # Channel page
│ ├── Subscriptions.swift # Subscription management
│ └── ...
├── Components/
│ ├── VideoPlayer.swift # Custom video player
│ ├── VideoCard.swift # Video list item component
│ └── ...
├── Models/
│ └── Schema.swift # Database schema definitions
└── ...
- Xcode 15+
- iOS 17.0+
- TubeSDK dependency
- Clone the repository
- Open in Xcode:
open App/PeerTubeSwift/PeerTubeSwift.xcodeproj
- Configure your PostHog credentials in the Xcode scheme environment variables (optional):
POSTHOG_PROJECT_TOKENPOSTHOG_HOST
- Build and run on a simulator or device
- Swiftfin — Jellyfin iOS client
- NewPipe — Android YouTube client
- Grayjay — Plugin-based video player
- PeerTube Plugin — Grayjay PeerTube plugin
Contributions welcome! Please read the existing codebase structure and follow the TCA patterns used throughout.
See LICENSE.md