Skip to content

fix: improve macOS Sequoia & Tahoe compatibility and stability#16

Open
tan9 wants to merge 5 commits intoAuroraWright:mainfrom
tan9:fix/sequoia-compatibility
Open

fix: improve macOS Sequoia & Tahoe compatibility and stability#16
tan9 wants to merge 5 commits intoAuroraWright:mainfrom
tan9:fix/sequoia-compatibility

Conversation

@tan9
Copy link
Copy Markdown

@tan9 tan9 commented Oct 25, 2025

Summary

This PR improves TomatoBar's compatibility and stability on macOS Sequoia (15.x) and Tahoe (26.x) by upgrading dependencies, preventing App Nap termination, and fixing UI layout issues.

Key Changes

1. Upgrade Dependencies for macOS Sequoia & Tahoe Compatibility

  • KeyboardShortcuts: 1.14.1 → 2.4.0
    • Includes macOS 15+ keyboard shortcut fixes
    • Improved Option key support
  • LaunchAtLogin: Legacy 5.0.0 → Modern 1.1.0
    • Uses native SMAppService API for macOS 13+
    • Removes unnecessary helper app copy script
  • Minimum macOS version: 12.0 → 13.0

2. Fix Timer Termination Issue

  • Add Process Activity Assertion to prevent App Nap
  • Fixes issue where app was terminated after ~19 minutes on macOS Sequoia & Tahoe
  • Uses ProcessInfo.beginActivity with .userInitiated and .idleSystemSleepDisabled options

3. Improve Notification Authorization Handling

  • Better error handling and logging
  • Add authorization status checking
  • Verify authorization before sending notifications
  • Add method to open system notification settings

4. Prevent Automatic Termination

  • Add NSSupportsAutomaticTermination = false
  • Add NSSupportsSuddenTermination = false
  • Ensures timer app runs continuously in background

5. Fix UI Layout Issues

  • Add .fixedSize() to prevent segmented control compression
  • Replace .frame(maxWidth: .infinity) with Spacer()
  • Increase popover width from 255 to 300
  • Fixes "Stop after" label wrapping vertically

Testing

Tested on macOS Sequoia 15.x and Tahoe 26.x:

  • ✅ App launches and displays menu bar icon correctly
  • ✅ Timer runs beyond 19 minutes without termination
  • ✅ Notification permissions work correctly
  • ✅ Launch at Login functionality works
  • ✅ Keyboard shortcuts work properly
  • ✅ UI layout displays properly without text wrapping

Breaking Changes

  • Minimum macOS version increased from 12.0 to 13.0
    • macOS 13 Ventura (released October 2022) is now required

Migration Notes

Users on macOS 12 will need to upgrade to macOS 13 or later to use this version.

Fixes

Resolves the consistent crash after 19 minutes on macOS Sequoia & Tahoe where the system terminated the app due to App Nap.

tan9 added 5 commits October 25, 2025 08:03
- Upgrade KeyboardShortcuts from 1.14.1 to 2.4.0
  * Includes macOS 15 keyboard shortcut fixes
  * Improves Option key support
- Migrate LaunchAtLogin from Legacy 5.0.0 to Modern 1.1.0
  * Uses native SMAppService API for macOS 13+
  * Removes unnecessary helper app copy script
- Update minimum macOS version from 12.0 to 13.0
- Update LaunchAtLogin API usage in View.swift
  * Replace @ObservedObject with @State
  * Use LaunchAtLogin.isEnabled directly with Binding
- Remove LaunchAtLogin.migrateIfNeeded() call in App.swift
Fixes issue where the app was being terminated by macOS after ~19 minutes
of inactivity on macOS Sequoia.

- Add activityToken property to track activity assertion
- Implement startActivity() to begin activity assertion
- Implement endActivity() to end activity assertion
- Call startActivity() when timer starts
- Call endActivity() when timer stops
- Uses ProcessInfo.beginActivity with .userInitiated and .idleSystemSleepDisabled options
- Improve authorization request error handling
  * Use optional binding for error handling
  * Log authorization status on denial
- Add checkAuthorizationStatus() method
- Add logAuthorizationStatus() with detailed status messages
- Add openSystemNotificationSettings() to guide users
- Add requestAuthorizationIfNeeded() for smart authorization
- Update send() method to verify authorization before sending
  * Check authorization status before each notification
  * Provide helpful error messages for different denial scenarios
- Import AppKit for NSWorkspace access
- Add NSSupportsAutomaticTermination = false
- Add NSSupportsSuddenTermination = false

These settings prevent macOS from automatically terminating the app
when it's considered inactive, which is important for a timer app
that needs to run continuously in the background.
- Add .fixedSize() to StartStopDropdown to prevent compression
- Replace .frame(maxWidth: .infinity) with Spacer() in HStacks
  * Prevents Text from taking all available space
  * Allows picker to maintain its ideal size
- Increase default popover width from 255 to 300
  * Accommodates segmented controls properly
  * Prevents "Stop after" label from wrapping
- Update localization file with new default width

Fixes issue where "Stop after" text was displaying vertically
and segmented control options were compressed.
@tan9 tan9 changed the title fix: improve macOS Sequoia compatibility and stability fix: improve macOS Sequoia & Tahoe compatibility and stability Oct 25, 2025
@ArtemYurov
Copy link
Copy Markdown

Hi! I added these fixes to my fork https://github.com/ArtemYurov/TomoBar, please test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants