Skip to content

fix(import): detect and import the Setapp edition of TablePlus#1539

Merged
datlechin merged 2 commits into
mainfrom
fix/issue-1528-tableplus-setapp
Jun 1, 2026
Merged

fix(import): detect and import the Setapp edition of TablePlus#1539
datlechin merged 2 commits into
mainfrom
fix/issue-1528-tableplus-setapp

Conversation

@datlechin
Copy link
Copy Markdown
Member

Closes #1528.

Problem

Importing from TablePlus reported "TablePlus is not installed" when the installed copy was the Setapp edition. TablePlusImporter hardcoded the standalone edition in three places:

  • appBundleIdentifier = "com.tinyapp.TablePlus", so the LaunchServices lookup behind installedAppURL()/isAvailable() never matched the Setapp bundle id com.tinyapp.TablePlus-setapp.
  • connectionsFileURL and groupsFileURL were pinned to .../com.tinyapp.TablePlus/Data/..., so even if detection passed, a Setapp user's connections (under com.tinyapp.TablePlus-setapp/Data/) would not be read.

Change

TablePlusImporter is now edition-aware, following the existing DBeaverImporter multi-edition pattern:

  • A knownBundleIdentifiers list (standalone first, then Setapp). installedAppURL() returns the first installed edition, so detection and the source-picker icon work for Setapp.
  • connectionsFileURL/groupsFileURL are computed from the installed edition's data folder instead of a hardcoded path. A pure dataDirectory(for:home:) builds the path.
  • appBundleIdentifier stays the standalone id (canonical for registry metadata).
  • The keychain service com.tableplus.TablePlus is shared across editions, so it is unchanged.

The Setapp edition is not sandboxed (its plugins live under the real ~/Library/Application Support/com.tinyapp.TablePlus-setapp/), so it mirrors the standalone Data/ layout and needs no container-path handling. The Mac App Store edition's bundle id is undocumented, so it is intentionally not added.

Tests

App detection and data-path resolution are now driven through injectable seams (resolveAppURL, dataDirectoryOverride), so the cases are deterministic without a real install. Added: Setapp detection, standalone-preferred-when-both-installed, no-edition-installed, the dataDirectory(for:home:) path, and connectionsFileURL following the Setapp edition (with standalone fallback).

This also fixes two pre-existing isAvailable tests that were leftovers from before detection moved to LaunchServices (#1305): they asserted file-based availability against an app-based check, so they passed or failed depending on whether TablePlus was installed on the test runner.

@datlechin datlechin merged commit 003f837 into main Jun 1, 2026
4 checks passed
@datlechin datlechin deleted the fix/issue-1528-tableplus-setapp branch June 1, 2026 12:33
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.

Import: TablePlus (Setapp edition) reported as "not installed"

1 participant