A native macOS menu bar application for managing StreamTV server.
Since the Xcode project file is complex, it's recommended to create it using Xcode:
- Open Xcode
- File → New → Project
- Choose "macOS" → "App"
- Product Name:
StreamTV - Bundle Identifier:
com.streamtv.app - Language: Swift
- Interface: SwiftUI
- Save in the
StreamTVApp/directory
- Select the project in the navigator
- Select the "StreamTV" target
- General tab:
- Deployment Target: macOS 13.0
- Bundle Identifier:
com.streamtv.app
- Signing & Capabilities:
- Enable "Automatically manage signing" or configure manual signing
- Add entitlements file:
StreamTV.entitlements
- Build Settings:
- Swift Language Version: Swift 5.9
- macOS Deployment Target: 13.0
Add all Swift files to the project:
StreamTVApp.swiftServerManager.swiftPythonManager.swiftFFmpegManager.swiftOllamaChecker.swiftDependencyUpdater.swiftMenuBarView.swiftFirstLaunchView.swift
- Select the target → Build Phases
- Copy Bundle Resources:
- Add
Info.plist - Add
Assets.xcassets - Add
streamtv/folder (as folder reference, not group) - Add
requirements.txt
- Add
The streamtv/ directory and requirements.txt need to be copied into the app bundle:
Automated Sync (Recommended):
cd StreamTVApp
./sync-python-code.shThis script automatically:
- Copies the latest
streamtv/directory from the root - Copies the latest
requirements.txtfrom the root - Verifies jsonschema versions are up to date
Manual Setup:
- Copy
streamtv/directory toStreamTVApp/StreamTV/StreamTV/ - Copy
requirements.txttoStreamTVApp/StreamTV/StreamTV/ - Add both to "Copy Bundle Resources" build phase in Xcode
Important: After syncing, ensure these files are added to Xcode's "Copy Bundle Resources" build phase:
streamtv/(as folder reference, not group)requirements.txt
./build-menu-bar-app.shThe build script will:
- Check Xcode version and environment
- Build the archive
- Export the app bundle
- Output the built app to
build/export/StreamTV.app
To notarize the app for distribution:
./notarize.sh build/export/StreamTV.app your@email.com app-specific-password TEAM_IDAfter building and notarizing, create a DMG:
# Using create-dmg (install via: brew install create-dmg)
create-dmg \
--volname "StreamTV" \
--window-pos 200 120 \
--window-size 800 400 \
--icon-size 100 \
--icon "StreamTV.app" 200 190 \
--hide-extension "StreamTV.app" \
--app-drop-link 600 185 \
"StreamTV.dmg" \
"build/export/StreamTV.app"
# Or using hdiutil
hdiutil create -volname "StreamTV" \
-srcfolder "build/export/StreamTV.app" \
-ov -format UDZO \
"StreamTV.dmg"- The app requires Python 3.8+ and FFmpeg
- Python dependencies are installed in a virtual environment in
~/Library/Application Support/StreamTV/venv - Server logs are stored in
~/Library/Application Support/StreamTV/logs/ - The app runs as a menu bar item (no dock icon) due to
LSUIElement = true