From 61f9307ac309bbf7789e23f0e9c816978fe655bc Mon Sep 17 00:00:00 2001 From: Vedank Purohit Date: Fri, 3 Jul 2026 02:18:53 +0530 Subject: [PATCH 1/2] Configure iOS Keychain access group for mobile This keeps development iOS builds aligned with the bundle-scoped Keychain storage used by SecureStore during local simulator pairing. --- apps/mobile/app.config.test.ts | 32 ++++++++++++++++++++++++++++++++ apps/mobile/app.config.ts | 3 +++ 2 files changed, 35 insertions(+) create mode 100644 apps/mobile/app.config.test.ts diff --git a/apps/mobile/app.config.test.ts b/apps/mobile/app.config.test.ts new file mode 100644 index 00000000000..2aa6609d448 --- /dev/null +++ b/apps/mobile/app.config.test.ts @@ -0,0 +1,32 @@ +import { afterEach, describe, expect, it, vi } from "vite-plus/test"; + +const originalAppVariant = process.env.APP_VARIANT; + +afterEach(() => { + if (originalAppVariant === undefined) { + delete process.env.APP_VARIANT; + } else { + process.env.APP_VARIANT = originalAppVariant; + } + + vi.resetModules(); +}); + +async function loadConfigForVariant(appVariant: string) { + process.env.APP_VARIANT = appVariant; + vi.resetModules(); + + const module = await import("./app.config"); + return module.default; +} + +describe("mobile app config", () => { + it("configures development iOS builds with a bundle-scoped Keychain access group", async () => { + const config = await loadConfigForVariant("development"); + + expect(config.ios?.bundleIdentifier).toBe("com.t3tools.t3code.dev"); + expect(config.ios?.entitlements?.["keychain-access-groups"]).toEqual([ + "$(AppIdentifierPrefix)com.t3tools.t3code.dev", + ]); + }); +}); diff --git a/apps/mobile/app.config.ts b/apps/mobile/app.config.ts index 8cdf6f2e25c..6eb969917ee 100644 --- a/apps/mobile/app.config.ts +++ b/apps/mobile/app.config.ts @@ -77,6 +77,9 @@ const config: ExpoConfig = { icon: variant.iosIcon, supportsTablet: true, bundleIdentifier: variant.iosBundleIdentifier, + entitlements: { + "keychain-access-groups": [`$(AppIdentifierPrefix)${variant.iosBundleIdentifier}`], + }, infoPlist: { NSAppTransportSecurity: { NSAllowsArbitraryLoads: true, From f368d56ec1830dfee666cc0ab73c07190ace17fd Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Sat, 4 Jul 2026 11:40:26 -0700 Subject: [PATCH 2/2] Delete apps/mobile/app.config.test.ts --- apps/mobile/app.config.test.ts | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 apps/mobile/app.config.test.ts diff --git a/apps/mobile/app.config.test.ts b/apps/mobile/app.config.test.ts deleted file mode 100644 index 2aa6609d448..00000000000 --- a/apps/mobile/app.config.test.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { afterEach, describe, expect, it, vi } from "vite-plus/test"; - -const originalAppVariant = process.env.APP_VARIANT; - -afterEach(() => { - if (originalAppVariant === undefined) { - delete process.env.APP_VARIANT; - } else { - process.env.APP_VARIANT = originalAppVariant; - } - - vi.resetModules(); -}); - -async function loadConfigForVariant(appVariant: string) { - process.env.APP_VARIANT = appVariant; - vi.resetModules(); - - const module = await import("./app.config"); - return module.default; -} - -describe("mobile app config", () => { - it("configures development iOS builds with a bundle-scoped Keychain access group", async () => { - const config = await loadConfigForVariant("development"); - - expect(config.ios?.bundleIdentifier).toBe("com.t3tools.t3code.dev"); - expect(config.ios?.entitlements?.["keychain-access-groups"]).toEqual([ - "$(AppIdentifierPrefix)com.t3tools.t3code.dev", - ]); - }); -});