Skip to content

Commit 17d391d

Browse files
mikepitreclaude
andcommitted
fix(verify): find the simulator trust store where trustd keeps it
doctor's proxy-trust check read Library/Keychains/TrustStore.sqlite3 only. The iOS 27.0 simulators keep it under private/var/protected/trustd/private, so the check failed on a template that does trust the proxy CA. Look in both places, the trustd one first. Same change as clerk-ios b3233a6c. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent dd021ac commit 17d391d

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

  • .claude/skills/verify-clerk-expo/src/platform/ios

‎.claude/skills/verify-clerk-expo/src/platform/ios/local.ts‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,11 @@ export function localIosBackend(options: LocalIosOptions = {}): DeviceBackend<Lo
250250
return backend;
251251
}
252252

253+
const TRUST_STORE_LOCATIONS = [
254+
['private', 'var', 'protected', 'trustd', 'private', 'TrustStore.sqlite3'],
255+
['Library', 'Keychains', 'TrustStore.sqlite3'],
256+
];
257+
253258
async function proxyTrustCheck(template: Simulator | undefined): Promise<DoctorCheck> {
254259
const proxy = await run('scutil', ['--proxy']);
255260
const httpsEnabled = /HTTPSEnable\s*:\s*1/.test(proxy.stdout);
@@ -258,8 +263,8 @@ async function proxyTrustCheck(template: Simulator | undefined): Promise<DoctorC
258263
const port = /HTTPSPort\s*:\s*(\d+)/.exec(proxy.stdout)?.[1] ?? '';
259264
const proxyName = `${where}${port ? `:${port}` : ''}`;
260265
if (template === undefined) return { id: 'proxy-trust', ok: false, detail: `HTTPS proxy ${proxyName} is on and there is no template to check`, fix: 'create the template first (see the template check)' };
261-
const store = join(simulatorDataDir(template.udid), 'Library', 'Keychains', 'TrustStore.sqlite3');
262-
if (!existsSync(store)) {
266+
const store = TRUST_STORE_LOCATIONS.map((parts) => join(simulatorDataDir(template.udid), ...parts)).find((path) => existsSync(path));
267+
if (store === undefined) {
263268
return { id: 'proxy-trust', ok: false, detail: `HTTPS proxy ${proxyName} is on and ${TEMPLATE_NAME} has no trust store`, fix: `boot ${TEMPLATE_NAME}, install and trust the proxy CA, then shut it down` };
264269
}
265270
const rows = await run('sqlite3', [store, 'select count(*) from tsettings']);

0 commit comments

Comments
 (0)