-
Notifications
You must be signed in to change notification settings - Fork 0
SwiftUI
Documentation for StreamTV SwiftUI applications and installers.
- Open Xcode
-
File → Open → Select
StreamTVInstaller/StreamTVInstaller.xcodeproj - Select "My Mac" as the destination
-
Press
Cmd+Bto build -
Press
Cmd+Rto run
The app will be built in StreamTVInstaller/build/ and you can test it immediately.
# Build using xcodebuild
cd StreamTVInstaller
xcodebuild -project StreamTVInstaller.xcodeproj \
-scheme "StreamTV Installer" \
-configuration Release \
-derivedDataPath build./build-installer.shStreamTVInstaller/
├── StreamTVInstaller.swift # App entry point
├── ContentView.swift # Main UI view
├── InstallerViewModel.swift # Installation logic
├── Package.swift # Swift Package Manager config
├── Info.plist # App metadata
├── StreamTVInstaller.xcodeproj/ # Xcode project
└── build/ # Build output
└── StreamTV Installer.app # Built application
- macOS: 11.0 (Big Sur) or later
- Xcode: 13.0 or later
- Swift: 5.5 or later
If the Xcode project doesn't exist:
- Open Xcode
- File → New → Project
- Select macOS → App
- Configure:
- Product Name:
StreamTV Installer - Team: (your team or None)
- Organization Identifier:
com.streamtv - Interface: SwiftUI
- Language: Swift
- Product Name:
- Save in the
StreamTVInstaller/directory - Replace generated files with existing Swift files in the directory
- In Xcode, select Product → Archive
- Wait for archive to complete
- Distribute the app from Organizer
For distribution outside the App Store:
- Get Apple Developer certificate
- In Xcode: Signing & Capabilities → Enable signing
- Archive and export
Make sure you're targeting macOS 11.0 or later:
- In Xcode: Project Settings → Deployment Target → macOS 11.0
Add import:
import AppKit- Clean build folder:
Cmd+Shift+K - Delete derived data
- Rebuild:
Cmd+B
After building:
- App will be in
StreamTVInstaller/build/StreamTV Installer.app - Double-click to run
- Or use:
open "StreamTVInstaller/build/StreamTV Installer.app"
The SwiftUI app automatically finds the StreamTV directory:
- When running as app bundle: Looks for StreamTV directory relative to app
- When running from source: Uses current directory
- Searches up directory tree to find StreamTV root
The SwiftUI installer provides a native macOS experience with a beautiful, modern interface built using Apple's SwiftUI framework. This replaces the Tkinter-based installer with a fully native macOS application.
Option 1: Using Xcode (Recommended)
- Open Xcode
-
File → Open → Navigate to
StreamTVInstaller/StreamTVInstaller.xcodeproj - If the project doesn't exist, create it:
- File → New → Project
- Select macOS → App
- Product Name:
StreamTV Installer - Interface: SwiftUI
- Language: Swift
- Save in the
StreamTVInstaller/directory - Replace generated files with existing Swift files
- Select "My Mac" as destination
-
Press
Cmd+Bto build -
Press
Cmd+Rto run
Option 2: Using Build Script
./build-installer.shOption 3: Command Line
cd StreamTVInstaller
xcodebuild -project StreamTVInstaller.xcodeproj \
-scheme "StreamTV Installer" \
-configuration ReleaseDouble-Click Method:
- Build the installer (see above)
- Double-click
Install-StreamTV-SwiftUI.command - The native SwiftUI installer will open
Direct App Launch:
- Navigate to
StreamTVInstaller/build/StreamTV Installer.app - Double-click the app
- ✅ SwiftUI Interface: Built with Apple's modern UI framework
- ✅ Native Look & Feel: Matches macOS Human Interface Guidelines
- ✅ Smooth Animations: Native macOS animations and transitions
- ✅ Dark Mode: Automatic dark mode support
- ✅ Accessibility: Full VoiceOver and accessibility support
- ✅ SF Symbols: Uses native macOS icon system
Each module shows its status with native SF Symbols:
-
Green Checkmark (
checkmark.circle.fill): Success -
Yellow Warning (
exclamationmark.triangle.fill): Issues detected -
Red Error (
xmark.circle.fill): Installation failed -
Blue Info (
info.circle.fill): Information messages
- ✅ Module Detection: Automatically detects existing installations
- ✅ Update Support: Updates existing modules when needed
- ✅ Auto-Fix: Attempts to fix detected issues automatically
- ✅ Real-time Progress: Live progress bar and status updates
- ✅ Path Independent: Works from any location
StreamTV/
├── StreamTVInstaller/
│ ├── StreamTVInstaller.swift # App entry point
│ ├── ContentView.swift # Main UI view
│ ├── InstallerViewModel.swift # Installation logic
│ ├── Package.swift # Swift Package Manager config
│ ├── Info.plist # App metadata
│ ├── StreamTVInstaller.xcodeproj/ # Xcode project
│ └── build/ # Build output directory
│ └── StreamTV Installer.app # Built application
├── build-installer.sh # Build script
├── Install-StreamTV-SwiftUI.command # Launcher
└── README_SWIFTUI.md # This file
- macOS: 11.0 (Big Sur) or later
- Xcode: 13.0 or later
- Swift: 5.5 or later
The installer handles:
- Python - Checks version, downloads installer if needed
- FFmpeg - Installs via Homebrew or direct download
- Virtual Environment - Creates/updates venv
- pip - Upgrades pip, setuptools, wheel
- Dependencies - Installs/updates Python packages
- Configuration - Sets up config.yaml
- Database - Initializes SQLite database
- Channels - Creates default channels
- Launch Scripts - Creates start scripts and launchd service
| Feature | SwiftUI Installer | Tkinter Installer |
|---|---|---|
| Native Look | ✅ Yes | ❌ No |
| Performance | ✅ Fast | |
| Dark Mode | ✅ Automatic | |
| Accessibility | ✅ Full | |
| Animations | ✅ Smooth | |
| SF Symbols | ✅ Yes | ❌ No |
| Build Required | ✅ No |
Install Xcode from the App Store, then:
xcode-select --installAdd import to ContentView.swift:
import AppKit- Clean build:
Cmd+Shift+Kin Xcode - Delete derived data
- Rebuild:
Cmd+B
- Right-click → Open (to bypass Gatekeeper)
- Check System Preferences → Security & Privacy
- For distribution, code sign the app
The app automatically finds the StreamTV directory:
- When running as app bundle: Looks relative to app location
- When running from source: Uses current directory
- Searches up directory tree to find StreamTV root
- Build the installer app
- Create a DMG or ZIP file
- Users can double-click to install
For distribution outside the App Store:
- Get Apple Developer certificate
- In Xcode: Signing & Capabilities → Enable signing
- Archive and export from Xcode
The SwiftUI installer provides the same functionality as the Python installer but with:
- Better performance
- Native macOS appearance
- Better accessibility
- Automatic dark mode
- Smoother animations
Both installers are available - choose based on your preference!
The SwiftUI app is fully path-independent:
- Works from any location
- Handles symlinks correctly
- Resolves absolute paths automatically
- Changes working directory as needed
See PATH_INDEPENDENCE.md for details.
Documentation for StreamTV's SwiftUI-based macOS applications.
- How to build SwiftUI applications
- Development setup
- Build process
- SwiftUI features
- Application overview
- Usage guide
StreamTV includes SwiftUI-based installers and utilities for macOS.
See installation docs for usage.