> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tablepro.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Testing a Custom Plugin

> Load a locally built driver plugin in a debug build of TablePro

A plugin's signature is checked only outside the app's own `PlugIns` directory. That one rule explains all three ways to run a plugin you built locally, and which of them a release build of TablePro would also accept. The dev script is the normal route; the other two are for when the signature check itself is in your way. See [Plugin Development](https://docs.tablepro.app/development/plugin-development.md) for writing the driver and [Plugin Registry](https://docs.tablepro.app/development/plugin-registry.md) for publishing it.

## Where plugins load from

`PluginManager` reads two directories on launch and treats them differently.

| Location | Source | Checked before loading |
| - | - | - |
| `PlugIns/` inside the app bundle | Built-in | `Info.plist` versions only |
| `~/Library/Application Support/TablePro/Plugins` | User-installed | `Info.plist` versions, then the code signature |

The version key goes first either way: a plugin whose `TableProPluginKitVersion` falls outside the app's compatible range is rejected before anything looks at its signature.

The signature check accepts one signer: the Apple team that signed the running app, which for a release is TablePro. Your own debug build accepts what your own Xcode signed for the same reason. Every other signature, ad-hoc signing and an unsigned bundle are refused, and nothing asks.

Do not reuse a built-in plugin's bundle ID. Installing over one fails outright, and at discovery the higher build (`CFBundleVersion`) wins, with the built-in taking a tie and the losing user copy deleted from disk.

## Install with the dev script

```bash theme={null}
apple/scripts/install-plugin-dev.sh MyDriverPlugin
```

It finds the newest `MyDriverPlugin.tableplugin` under DerivedData and copies it into the user plugins directory. Relaunch TablePro to load it. Build from Xcode first: the script reads DerivedData, and a command-line `xcodebuild` writes to `build/Debug` instead, where the script never looks.

> [!WARNING]
>
> Never edit the copied bundle, `Info.plist` included. Any change invalidates the code signature and dyld then refuses to load the executable.

## Bundle it into the app instead

A plugin embedded in `PlugIns/` skips the signature check entirely, which is the shortest path when the team check is the thing in your way. Add the target to the app's dependency list in `apple/project.yml`:

```yaml theme={null}
targets:
  TablePro:
    dependencies:
      - target: MyDriverPlugin
        embed: true
        copy:
          destination: plugins
```

Then run `apple/scripts/generate-project.sh` and build. XcodeGen puts the bundle in an **Embed Dependencies** copy phase with `CodeSignOnCopy`, so it is re-signed with your debug identity on the way in.

> [!WARNING]
>
> `apple/TablePro.xcodeproj` is generated and gitignored, so adding the plugin through the Xcode UI survives exactly until the next `apple/scripts/generate-project.sh`. Edit `apple/project.yml`. Take the entry back out before you open a pull request, or the plugin rides into a release build.

## Skip the signature check

A Debug build skips signature verification altogether when `TABLEPRO_ALLOW_UNSIGNED_PLUGINS` is set to `1`. Set it under **Product > Scheme > Edit Scheme > Run > Arguments**, in the environment variables list.

This is the route for a bundle built on another machine or signed by another team. The bundle still has to be validly signed for dyld to load it at all. The escape hatch is compiled out of Release builds, so it cannot mask a signing problem that would reach a user.

## When it does not load

The reason lands in a **Plugin Installation Failed** alert when you open the bundle from Finder, and in a row at the top of **Settings > Extensions** when you install it there. Otherwise it is under **Couldn't Load** in the same pane, on the plugin's page.

| Message | What it means | What to do |
| - | - | - |
| **Plugin code signature verification failed: bundle is not signed by TablePro** | A valid signature from a team other than the running app's | Sign with the app's team, or set `TABLEPRO_ALLOW_UNSIGNED_PLUGINS=1` in a Debug build |
| **Plugin code signature verification failed: …** | Unsigned, ad-hoc signed, modified after signing, or a symbolic link that points outside the bundle | Rebuild rather than patch. Any edit to a signed bundle breaks the seal |
| **Plugin was built for PluginKit version …; this release of TablePro needs version …** | The bundle predates a breaking ABI bump | Rebuild the plugin against the current TableProPluginKit |
| **A built-in plugin "…" already provides this bundle ID** | The bundle ID collides with a bundled plugin | Give your plugin its own bundle ID |

Once it loads and works, publish it through the [Plugin Registry](https://docs.tablepro.app/development/plugin-registry.md) so users get a signed binary.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.