Skip to content

First‐class support for the new Mail extensions on macOS 13+#287

Open
theZ3r0CooL wants to merge 1 commit intoseemoo-lab:mainfrom
theZ3r0CooL:feat/mail-extension
Open

First‐class support for the new Mail extensions on macOS 13+#287
theZ3r0CooL wants to merge 1 commit intoseemoo-lab:mainfrom
theZ3r0CooL:feat/mail-extension

Conversation

@theZ3r0CooL
Copy link

Falls back to the old .mailbundle plugin on earlier releases

• `MailPluginManager.swift`
  – Added `supportsMailExtension` check (#available(macOS 13, *)).
  – Updated `isMailPluginInstalled` to immediately returns true on 13+, otherwise does the old bundle-UUID check.
  – `installMailPlugin()` is a no-op on 13+ (just opens Mail.app to let the user enable the extension) & still copies the bundle on older macOS.
  – `uninstallMailPlugin()` & `pluginDownload()` similarly skip bundle actions on 13+.

• `OpenHaystackSettingsView.swift`
  – The toggle label now switches based on OS version: “Use Apple Mail Plugin (≤12)” vs “Enable Mail Extension (≥13)”.

• `OpenHaystackMainView.swift`
  – The toolbar “Reload” button reads “Reload Extension” on 13+ (stays “Reload” on older macOS).
  – The popover text dynamically refers to the “mail extension” vs “mail plug-in” based on runtime availability.

• `OpenHaystackTests.swift`
  – `testPluginInstallation()` now skips itself on macOS 13+ with `try XCTSkip(...)` & only runs the bundle-copy assertions on older OS.

Falls back to the old `.mailbundle` plugin on earlier releases

    • `MailPluginManager.swift`
      – Added `supportsMailExtension` check (#available(macOS 13, *)).
      – Updated `isMailPluginInstalled` to immediately returns true on 13+, otherwise does the old bundle-UUID check.
      – `installMailPlugin()` is a no-op on 13+ (just opens Mail.app to let the user enable the extension) & still copies the bundle on older macOS.
      – `uninstallMailPlugin()` & `pluginDownload()` similarly skip bundle actions on 13+.

    • `OpenHaystackSettingsView.swift`
      – The toggle label now switches based on OS version: “Use Apple Mail Plugin (≤12)” vs “Enable Mail Extension (≥13)”.

    • `OpenHaystackMainView.swift`
      – The toolbar “Reload” button reads “Reload Extension” on 13+ (stays “Reload” on older macOS).
      – The popover text dynamically refers to the “mail extension” vs “mail plug-in” based on runtime availability.

    • `OpenHaystackTests.swift`
      – `testPluginInstallation()` now skips itself on macOS 13+ with `try XCTSkip(...)` & only runs the bundle-copy assertions on older OS.
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.

1 participant