Skip to content

Fastest and only macOS Dictation app with on-device STT and custom trained AI enhancement model. Windows, iOS testflight! Android, Linux waitlist open! A local Wispr Flow alternative. Follow https://x.com/fluidvoiceapp for more

feat: integrate AppUpdater for automatic updates

altic-dev0cdd8efdb22d
diff --git a/.gitignore b/.gitignore
index 4e71e1b1..de65f676 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,9 @@ xcuserdata/
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
+
+## Swift Package Manager
+.build/
*.moved-aside
*.pbxuser
!default.pbxuser
diff --git a/Fluid.xcodeproj/project.pbxproj b/Fluid.xcodeproj/project.pbxproj
index 05e3d32e..ee175c4c 100644
--- a/Fluid.xcodeproj/project.pbxproj
+++ b/Fluid.xcodeproj/project.pbxproj
@@ -8,6 +8,7 @@
/* Begin PBXBuildFile section */
7C078DA52E3B386A00FB7CAC /* FluidAudio in Frameworks */ = {isa = PBXBuildFile; productRef = 7C078DA42E3B386A00FB7CAC /* FluidAudio */; };
+ 7CE006BD2E80EBE600DDCCD6 /* AppUpdater in Frameworks */ = {isa = PBXBuildFile; productRef = 7CE006BC2E80EBE600DDCCD6 /* AppUpdater */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -27,6 +28,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 7CE006BD2E80EBE600DDCCD6 /* AppUpdater in Frameworks */,
7C078DA52E3B386A00FB7CAC /* FluidAudio in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -71,6 +73,7 @@
name = fluid;
packageProductDependencies = (
7C078DA42E3B386A00FB7CAC /* FluidAudio */,
+ 7CE006BC2E80EBE600DDCCD6 /* AppUpdater */,
);
productName = Fluid;
productReference = 7C078D8F2E3B339200FB7CAC /* Fluid.app */;
@@ -102,6 +105,7 @@
minimizedProjectReferenceProxies = 1;
packageReferences = (
7C078DA32E3B386A00FB7CAC /* XCRemoteSwiftPackageReference "FluidAudio" */,
+ 7CE006BB2E80EBE600DDCCD6 /* XCRemoteSwiftPackageReference "AppUpdater" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = 7C078D902E3B339200FB7CAC /* Products */;
@@ -401,6 +405,14 @@
kind = branch;
};
};
+ 7CE006BB2E80EBE600DDCCD6 /* XCRemoteSwiftPackageReference "AppUpdater" */ = {
+ isa = XCRemoteSwiftPackageReference;
+ repositoryURL = "https://github.com/mxcl/AppUpdater.git";
+ requirement = {
+ kind = upToNextMajorVersion;
+ minimumVersion = 1.1.1;
+ };
+ };
/* End XCRemoteSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
@@ -409,6 +421,11 @@
package = 7C078DA32E3B386A00FB7CAC /* XCRemoteSwiftPackageReference "FluidAudio" */;
productName = FluidAudio;
};
+ 7CE006BC2E80EBE600DDCCD6 /* AppUpdater */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = 7CE006BB2E80EBE600DDCCD6 /* XCRemoteSwiftPackageReference "AppUpdater" */;
+ productName = AppUpdater;
+ };
/* End XCSwiftPackageProductDependency section */
};
rootObject = 7C078D872E3B339200FB7CAC /* Project object */;
diff --git a/Fluid.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Fluid.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
index 5c582b76..a81b172b 100644
--- a/Fluid.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
+++ b/Fluid.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -1,6 +1,15 @@
{
- "originHash" : "d526b956b2941e51520eb1a181d281939054defb03feb9302533a12952391e2e",
+ "originHash" : "5fb64993316baee53fa040ae9eed2205d41e7618ec2ebd2fea554527d0b01783",
"pins" : [
+ {
+ "identity" : "appupdater",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/mxcl/AppUpdater.git",
+ "state" : {
+ "revision" : "1b60169700489f16cfbe2feb6b1e32ca5c9464b8",
+ "version" : "1.1.1"
+ }
+ },
{
"identity" : "fluidaudio",
"kind" : "remoteSourceControl",
@@ -9,6 +18,42 @@
"branch" : "main",
"revision" : "038c9229ac457fd9653741360c56bc2fa0917705"
}
+ },
+ {
+ "identity" : "foundation",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/PromiseKit/Foundation",
+ "state" : {
+ "revision" : "985f17fa69ee0e5b7eb3ff9be87ffc4e05fc0927",
+ "version" : "3.4.0"
+ }
+ },
+ {
+ "identity" : "path.swift",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/mxcl/Path.swift",
+ "state" : {
+ "revision" : "8e355c28e9393c42e58b18c54cace2c42c98a616",
+ "version" : "1.4.1"
+ }
+ },
+ {
+ "identity" : "promisekit",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/mxcl/PromiseKit.git",
+ "state" : {
+ "revision" : "8a98e31a47854d3180882c8068cc4d9381bf382d",
+ "version" : "6.22.1"
+ }
+ },
+ {
+ "identity" : "version",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/mxcl/Version",
+ "state" : {
+ "revision" : "200046c93f6d5d78a6d72bfd9c0b27a95e9c0a2b",
+ "version" : "1.2.0"
+ }
}
],
"version" : 3
diff --git a/Package.resolved b/Package.resolved
new file mode 100644
index 00000000..41db22f0
--- /dev/null
+++ b/Package.resolved
@@ -0,0 +1,59 @@
+{
+ "pins" : [
+ {
+ "identity" : "appupdater",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/mxcl/AppUpdater.git",
+ "state" : {
+ "revision" : "1b60169700489f16cfbe2feb6b1e32ca5c9464b8",
+ "version" : "1.1.1"
+ }
+ },
+ {
+ "identity" : "fluidaudio",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/FluidInference/FluidAudio",
+ "state" : {
+ "revision" : "a5eeed9a0d5699c765670b5f56704739beb32a76",
+ "version" : "0.5.2"
+ }
+ },
+ {
+ "identity" : "foundation",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/PromiseKit/Foundation",
+ "state" : {
+ "revision" : "985f17fa69ee0e5b7eb3ff9be87ffc4e05fc0927",
+ "version" : "3.4.0"
+ }
+ },
+ {
+ "identity" : "path.swift",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/mxcl/Path.swift",
+ "state" : {
+ "revision" : "8e355c28e9393c42e58b18c54cace2c42c98a616",
+ "version" : "1.4.1"
+ }
+ },
+ {
+ "identity" : "promisekit",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/mxcl/PromiseKit.git",
+ "state" : {
+ "revision" : "8a98e31a47854d3180882c8068cc4d9381bf382d",
+ "version" : "6.22.1"
+ }
+ },
+ {
+ "identity" : "version",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/mxcl/Version",
+ "state" : {
+ "revision" : "200046c93f6d5d78a6d72bfd9c0b27a95e9c0a2b",
+ "version" : "1.2.0"
+ }
+ }
+ ],
+ "version" : 2
+}
diff --git a/Package.swift b/Package.swift
new file mode 100644
index 00000000..fdefd61b
--- /dev/null
+++ b/Package.swift
@@ -0,0 +1,24 @@
+// swift-tools-version: 5.9
+// The swift-tools-version declares the minimum version of Swift required to build this package.
+
+import PackageDescription
+
+let package = Package(
+ name: "Fluid",
+ platforms: [
+ .macOS(.v13)
+ ],
+ dependencies: [
+ .package(url: "https://github.com/mxcl/AppUpdater.git", from: "1.0.0"),
+ .package(url: "https://github.com/FluidInference/FluidAudio", from: "0.5.0")
+ ],
+ targets: [
+ .executableTarget(
+ name: "Fluid",
+ dependencies: [
+ "AppUpdater",
+ "FluidAudio"
+ ]
+ )
+ ]
+)
diff --git a/RELEASE_GUIDE.md b/RELEASE_GUIDE.md
new file mode 100644
index 00000000..24fa6da4
--- /dev/null
+++ b/RELEASE_GUIDE.md
@@ -0,0 +1,228 @@
+# 🚀 Fluid App Release Guide - Complete End-to-End Setup
+
+This guide covers everything you need to know to set up automatic updates for your Fluid dictation app.
+
+## 📋 **Current Configuration**
+
+- **GitHub Repository**: `https://github.com/altic-dev/fluid`
+- **Owner**: `altic-dev`
+- **Repository Name**: `fluid`
+- **Current Version**: `1.1` (as set in Info.plist)
+
+## 🔧 **1. AppUpdater Setup (Already Done!)**
+
+✅ **AppUpdater Integration Complete**:
+- Added as Swift Package dependency
+- Configured in AppDelegate with automatic daily checks
+- Manual update check available in menu bar
+- Error handling and user notifications implemented
+
+## 📦 **2. Building and Packaging Your App**
+
+### **Build Steps:**
+1. **Set Release Configuration**:
+ ```bash
+ # In Xcode, change scheme to "Release" mode
+ # Or via command line:
+ xcodebuild -project Fluid.xcodeproj -scheme Fluid -configuration Release clean build
+ ```
+
+2. **Archive Your App**:
+ ```bash
+ # Create an archive
+ xcodebuild -project Fluid.xcodeproj -scheme Fluid -configuration Release archive -archivePath build/Fluid.xcarchive
+
+ # Export the app
+ xcodebuild -exportArchive -archivePath build/Fluid.xcarchive -exportPath build/Release -exportOptionsPlist ExportOptions.plist
+ ```
+
+3. **Create Release ZIP**:
+ ```bash
+ # Navigate to your exported app
+ cd build/Release
+
+ # Create zip with EXACT naming convention
+ zip -r fluid-1.1.zip Fluid.app
+ ```
+
+## 🎯 **3. GitHub Release Setup**
+
+### **Critical Requirements:**
+
+#### **A. Asset Naming Convention**
+AppUpdater expects this EXACT format:
+```
+{repo-name}-{version}.{extension}
+```
+
+**Examples:**
+- ✅ `fluid-1.1.zip`
+- ✅ `fluid-1.2.zip`
+- ✅ `fluid-2.0.zip`
+- ❌ `Fluid-1.1.zip` (wrong case)
+- ❌ `fluid-v1.1.zip` (extra 'v')
+- ❌ `fluid_1.1.zip` (underscore instead of dash)
+
+#### **B. Version Matching**
+The release tag must match your `CFBundleShortVersionString` in Info.plist:
+
+**Info.plist:**
+```xml
+<key>CFBundleShortVersionString</key>
+<string>1.1</string>
+```
+
+**GitHub Release Tag:**
+```
+v1.1 (recommended)
+or
+1.1 (also works)
+```
+
+### **Creating a Release:**
+
+1. **Go to your repository**: `https://github.com/altic-dev/fluid/releases`
+
+2. **Click "Create a new release"**
+
+3. **Fill out the release:**
+ ```
+ Tag: v1.1
+ Title: Fluid v1.1 - Parakeet TDT v3 with Multi-Language Support
+ Description:
+ ## 🎉 What's New in v1.1
+
+ - **Upgraded to Parakeet TDT v3** with unified model architecture
+ - **25 European languages** with auto-detection support
+ - **Enhanced UI** with language selection and documentation links
+ - **Improved error handling** and logging
+ - **Automatic updates** - this is the first version with auto-update capability!
+
+ ## 🚀 Installation
+ 1. Download `fluid-1.1.zip`
+ 2. Extract and move `Fluid.app` to your Applications folder
+ 3. Run the app and grant accessibility permissions when prompted
+
+ ## 🔧 System Requirements
+ - macOS 13.0 or later
+ - Apple Silicon or Intel Mac
+ ```
+
+4. **Upload your zip file**: Drag `fluid-1.1.zip` to the release assets
+
+5. **Publish the release**
+
+## 📅 **4. Future Release Process**
+
+For version 1.2 and beyond:
+
+### **Step 1: Update Version Numbers**
+```xml
+<!-- In Info.plist -->
+<key>CFBundleVersion</key>
+<string>2</string> <!-- Increment build number -->
+<key>CFBundleShortVersionString</key>
+<string>1.2</string> <!-- New version -->
+```
+
+### **Step 2: Build and Package**
+```bash
+# Build release version
+xcodebuild -project Fluid.xcodeproj -scheme Fluid -configuration Release clean build
+
+# Create zip with new version number
+zip -r fluid-1.2.zip Fluid.app
+```
+
+### **Step 3: Create GitHub Release**
+- **Tag**: `v1.2`
+- **Asset**: `fluid-1.2.zip`
+- **Title**: `Fluid v1.2 - [Your New Features]`
+
+## 🔍 **5. Testing the Update System**
+
+### **Manual Testing:**
+1. Install version 1.1 on your Mac
+2. Create a test release 1.2
+3. Click "Check for Updates..." in the menu bar
+4. Verify the update downloads and installs correctly
+
+### **Automatic Testing:**
+- AppUpdater checks daily automatically
+- Users will get updates silently
+- No user interaction required for updates
+
+## ⚙️ **6. Advanced Configuration**
+
+### **Code Signing (Recommended)**
+AppUpdater verifies code signatures for security:
+```bash
+# Sign your app before zipping
+codesign --force --deep --sign "Developer ID Application: Your Name" Fluid.app
+```
+
+### **Notarization (For Distribution)**
+```bash
+# Notarize for macOS Gatekeeper
+xcrun notarytool submit fluid-1.1.zip --apple-id [email protected] --team-id YOUR_TEAM_ID --wait
+```
+
+## 🎯 **7. Repository Structure**
+
+Your repository should look like this:
+```
+fluid/
+├── Sources/
+├── Info.plist
+├── README.md
+├── RELEASE_GUIDE.md ← This file
+└── releases/
+ ├── v1.1/
+ │ └── fluid-1.1.zip
+ └── v1.2/
+ └── fluid-1.2.zip
+```
+
+## 🚨 **8. Troubleshooting**
+
+### **Common Issues:**
+
+**AppUpdater says "no updates available" but there's a new release:**
+- Check asset naming: must be `fluid-{version}.zip`
+- Verify version in Info.plist matches release tag
+- Ensure release is published (not draft)
+
+**Update fails to install:**
+- Check code signing matches
+- Verify app isn't running during update
+- Check file permissions
+
+**Manual update check doesn't work:**
+- Verify AppDelegate is properly connected
+- Check menu bar action is calling the right method
+- Look at console logs for errors
+
+## ✅ **9. Verification Checklist**
+
+Before each release:
+- [ ] Version updated in Info.plist
+- [ ] App builds successfully in Release configuration
+- [ ] Asset named correctly: `fluid-{version}.zip`
+- [ ] Release tag matches Info.plist version
+- [ ] Release description includes changelog
+- [ ] Asset uploaded to GitHub release
+- [ ] Release published (not draft)
+- [ ] Manual update check tested
+- [ ] App functionality verified after update
+
+## 🎉 **Success!**
+
+Your app now has:
+- ✅ Automatic daily update checks
+- ✅ Manual update checking via menu bar
+- ✅ Silent update installation
+- ✅ Error handling and user notifications
+- ✅ Proper version management
+- ✅ Complete end-to-end update pipeline
+
+Users will now receive updates automatically without any manual intervention! 🚀
diff --git a/Sources/Fluid/AppDelegate.swift b/Sources/Fluid/AppDelegate.swift
new file mode 100644
index 00000000..db5d1333
--- /dev/null
+++ b/Sources/Fluid/AppDelegate.swift
@@ -0,0 +1,102 @@
+//
+// AppDelegate.swift
+// Fluid
+//
+// Created by Barathwaj Anandan on 9/22/25.
+//
+
+import AppUpdater
+import SwiftUI
+import AppKit
+
+class AppDelegate: NSObject, NSApplicationDelegate {
+ private var updater: AppUpdater?
+
+ func applicationDidFinishLaunching(_ notification: Notification) {
+ // Initialize AppUpdater for automatic updates
+ // Repository: https://github.com/altic-dev/Fluid-oss
+ updater = AppUpdater(owner: "altic-dev", repo: "Fluid-oss")
+
+ // Request accessibility permissions for global hotkey monitoring
+ requestAccessibilityPermissions()
+
+ // Initialize app settings (dock visibility, etc.)
+ SettingsStore.shared.initializeAppSettings()
+
+ // Note: App UI is designed with dark color scheme in mind
+ // All gradients and effects are optimized for dark mode
+ }
+
+ // MARK: - Manual Update Check
+ @objc func checkForUpdatesManually() {
+ guard let updater = updater else {
+ DebugLogger.shared.error("AppUpdater not initialized", source: "AppDelegate")
+ showUpdateAlert(title: "Update Error", message: "Update system not available")
+ return
+ }
+
+ DebugLogger.shared.info("Manual update check requested", source: "AppDelegate")
+
+ updater.check().catch(policy: .allErrors) { error in
+ DispatchQueue.main.async {
+ if error.isCancelled {
+ // User is already up-to-date
+ DebugLogger.shared.info("App is already up-to-date", source: "AppDelegate")
+ self.showUpdateAlert(title: "No Updates", message: "You're already running the latest version of Fluid!")
+ } else {
+ // Handle update error
+ DebugLogger.shared.error("Update check failed: \(error)", source: "AppDelegate")
+ self.showUpdateAlert(title: "Update Check Failed", message: "Unable to check for updates. Please try again later.\n\nError: \(error.localizedDescription)")
+ }
+ }
+ }
+ }
+
+ private func showUpdateAlert(title: String, message: String) {
+ let alert = NSAlert()
+ alert.messageText = title
+ alert.informativeText = message
+ alert.alertStyle = .informational
+ alert.addButton(withTitle: "OK")
+ alert.runModal()
+ }
+
+ private func requestAccessibilityPermissions() {
+ // Never show if already trusted
+ guard !AXIsProcessTrusted() else { return }
+
+ // Per-session debounce
+ if AXPromptState.hasPromptedThisSession { return }
+
+ // Cooldown: avoid re-prompting too often across launches
+ let cooldownKey = "AXLastPromptAt"
+ let now = Date().timeIntervalSince1970
+ let last = UserDefaults.standard.double(forKey: cooldownKey)
+ let oneDay: Double = 24 * 60 * 60
+ if last > 0 && (now - last) < oneDay {
+ return
+ }
+
+ DebugLogger.shared.warning("Accessibility permissions required for global hotkeys.", source: "AppDelegate")
+ DebugLogger.shared.info("Prompting for Accessibility permission…", source: "AppDelegate")
+
+ let options = [kAXTrustedCheckOptionPrompt.takeUnretainedValue() as String: true] as CFDictionary
+ AXIsProcessTrustedWithOptions(options)
+
+ AXPromptState.hasPromptedThisSession = true
+ UserDefaults.standard.set(now, forKey: cooldownKey)
+
+ // If still not trusted shortly after, deep-link to the Accessibility pane for convenience
+ DispatchQueue.main.asyncAfter(deadline: .now() + 1.2) {
+ guard !AXIsProcessTrusted(),
+ let url = URL(string: "x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility")
+ else { return }
+ NSWorkspace.shared.open(url)
+ }
+ }
+}
+
+// MARK: - Session Debounce State
+private enum AXPromptState {
+ static var hasPromptedThisSession: Bool = false
+}
diff --git a/Sources/Fluid/Services/MenuBarManager.swift b/Sources/Fluid/Services/MenuBarManager.swift
index 2f764824..5f27899a 100644
--- a/Sources/Fluid/Services/MenuBarManager.swift
+++ b/Sources/Fluid/Services/MenuBarManager.swift
@@ -156,6 +156,11 @@ final class MenuBarManager: ObservableObject {
openItem.target = self
menu.addItem(openItem)
+ // Check for Updates
+ let updateItem = NSMenuItem(title: "Check for Updates...", action: #selector(checkForUpdates), keyEquivalent: "")
+ updateItem.target = self
+ menu.addItem(updateItem)
+
menu.addItem(.separator())
// Quit
@@ -184,6 +189,13 @@ final class MenuBarManager: ObservableObject {
updateMenu()
}
+ @objc private func checkForUpdates() {
+ // Call the AppDelegate's manual update check method
+ if let appDelegate = NSApp.delegate as? AppDelegate {
+ appDelegate.checkForUpdatesManually()
+ }
+ }
+
@objc private func openMainWindow() {
// First, unhide the app if it's hidden
if NSApp.isHidden {
diff --git a/Sources/Fluid/fluidApp.swift b/Sources/Fluid/fluidApp.swift
index f98e923a..819570d1 100644
--- a/Sources/Fluid/fluidApp.swift
+++ b/Sources/Fluid/fluidApp.swift
@@ -12,16 +12,12 @@ import ApplicationServices
@main
struct fluidApp: App {
@StateObject private var menuBarManager = MenuBarManager()
-
- init() {
- // Request accessibility permissions for global hotkey monitoring
- requestAccessibilityPermissions()
+ @NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
- // Initialize app settings (dock visibility, etc.)
- SettingsStore.shared.initializeAppSettings()
-
+ init() {
// Note: App UI is designed with dark color scheme in mind
// All gradients and effects are optimized for dark mode
+ // AppDelegate handles initialization and permissions
}
var body: some Scene {
@@ -31,43 +27,4 @@ struct fluidApp: App {
.preferredColorScheme(.dark) // Force dark mode to prevent UI issues
}
}
-
- private func requestAccessibilityPermissions() {
- // Never show if already trusted
- guard !AXIsProcessTrusted() else { return }
-
- // Per-session debounce
- if AXPromptState.hasPromptedThisSession { return }
-
- // Cooldown: avoid re-prompting too often across launches
- let cooldownKey = "AXLastPromptAt"
- let now = Date().timeIntervalSince1970
- let last = UserDefaults.standard.double(forKey: cooldownKey)
- let oneDay: Double = 24 * 60 * 60
- if last > 0 && (now - last) < oneDay {
- return
- }
-
- DebugLogger.shared.warning("Accessibility permissions required for global hotkeys.", source: "fluidApp")
- DebugLogger.shared.info("Prompting for Accessibility permission…", source: "fluidApp")
-
- let options = [kAXTrustedCheckOptionPrompt.takeUnretainedValue() as String: true] as CFDictionary
- AXIsProcessTrustedWithOptions(options)
-
- AXPromptState.hasPromptedThisSession = true
- UserDefaults.standard.set(now, forKey: cooldownKey)
-
- // If still not trusted shortly after, deep-link to the Accessibility pane for convenience
- DispatchQueue.main.asyncAfter(deadline: .now() + 1.2) {
- guard !AXIsProcessTrusted(),
- let url = URL(string: "x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility")
- else { return }
- NSWorkspace.shared.open(url)
- }
- }
-}
-
-// MARK: - Session Debounce State
-private enum AXPromptState {
- static var hasPromptedThisSession: Bool = false
}