A macOS menu bar app that shows your Porsche vehicle's battery level, range, and status at a glance.
- Battery percentage and range displayed in the menu bar
- Vehicle info card with image, mileage, and lock status
- Switch between front, side, rear, and top vehicle views
- Multi-vehicle support with vehicle switcher
- Configurable auto-refresh interval (1-30 minutes)
- Biometric authentication (Touch ID) on refresh
- Automatic captcha solving via Vision OCR
- Credentials and tokens stored securely in Keychain
- macOS 13.0+ (Apple Silicon or Intel)
- Porsche ID account with Porsche Connect subscription
Grab the latest PorscheBar.app.zip from Releases, unzip it, and drag to Applications.
On first launch, macOS will show "cannot be opened because the developer cannot be verified." To bypass this: right-click the app, select Open, then click Open in the dialog.
- Launch the app -- it appears as a battery icon in the menu bar
- Enter your Porsche ID credentials when prompted
- Approve Keychain access with "Always Allow" (first launch only)
- Click the battery icon to see vehicle details
- Use "Refresh Now" or wait for auto-refresh
Requires Xcode Command Line Tools (xcode-select --install).
# Clone both repos side by side
git clone https://github.com/peerb/PorscheBar.git
git clone https://github.com/peerb/SwiftPorscheConnect.git
cd PorscheBar
# Optional: create a self-signed certificate to avoid Keychain prompts
# on every launch during development (one-time setup)
./setup-signing.sh
# Build and run
./build.sh
open PorscheBar.appIf setup-signing.sh fails, create the certificate manually in Keychain Access:
- Menu: Keychain Access > Certificate Assistant > Create a Certificate...
- Name:
PorscheBar Development, Identity Type: Self Signed Root, Certificate Type: Code Signing - Double-click the certificate > Trust > Code Signing: Always Trust
swiftc -swift-version 5 -target arm64-apple-macosx13.0 \
Sources/Models.swift Sources/KeychainHelper.swift Sources/BatteryIcon.swift \
Tests/Tests.swift \
-framework Security -framework AppKit -framework CoreGraphics \
-o /tmp/PorscheBarTests && /tmp/PorscheBarTestsSources/
main.swift # App entry point, menu building, dialogs
RefreshController.swift # Refresh lifecycle, timer, biometric auth
PorscheAPIClient.swift # API client singleton, image downloads, captcha
Models.swift # Constants, error types, data URI helper
KeychainHelper.swift # Keychain CRUD operations
KeychainTokenStore.swift# OAuth token storage in Keychain
VehicleCardView.swift # Vehicle info card (NSView)
VehicleIcons.swift # Vehicle icon scaling for menu
BatteryIcon.swift # Battery percentage icon renderer
Tests/
Tests.swift # Unit tests (34 tests)
Resources/
AppIcon.icns # App icon
PorscheBar.app/ # Bundle template (Info.plist)
build.sh # Build script (swiftc, no Xcode required)
setup-signing.sh # Code signing certificate setup
ARCHITECTURE.md # Architecture decision records
The app follows a clean separation between coordination and UI:
RefreshControllerowns the refresh lifecycle (timer, biometric auth, data fetching, error state) and communicates with the UI via a delegate protocolAppDelegateis a thin UI shell: status item, menu building, modal dialogs, and delegate callbacksPorscheAPIClientbridges the async SwiftPorscheConnect library, manages cached vehicle data and images- All API calls use async/await end-to-end, with
MainActor.runat the UI boundary
See ARCHITECTURE.md for detailed decision records, including:
- Why pure Swift (no Python dependency)
- Token storage in Keychain
- OAuth2 auth flow with captcha handling
- Async/await over completion handlers
- Self-signed certificate for Keychain trust
This project is not affiliated with, endorsed by, or connected to Porsche AG.
MIT -- see LICENSE.