AppiumTransport.registerVault method
AppiumTransport › registerVault
Registers a vault on mobile by pushing files and configuring localStorage.The registration flow: 1. Push a minimal
.obsidian/app.json to the device so Obsidian recognizes the vault 2. Switch to the WebView context 3. Add the vault to localStorage (mobile-external-vaults, mobile-selected-vault, enable-plugin-<path>) 4. Trigger location.reload() so Obsidian re-reads localStorage and opens the vault 5. Wait for app.workspace.layoutReadyExisting vault registrations in localStorage are preserved (append, not overwrite) — except the **harness's own**
temp-vault-* registrations from earlier runs, which are pruned when AppiumTransportConfig.shouldSweepLeftovers is on. Their directories are already gone (the factory sweeps them before the app launches), and it is this registry — not the filesystem — that Obsidian enumerates at startup, so leaving them is what makes each failed run slow the next one down.Signature:
registerVault(vaultPath: string): Promise<void>Parameters:
| Parameter | Type | Description |
|---|---|---|
| vaultPath | string | The absolute path to the vault on the host machine. |