Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
chore(ios): release 2.0.10 (build 189) (#8114)
Peter Chinman6a4b46704d46
diff --git a/.github/workflows/ios-app-store-release.yml b/.github/workflows/ios-app-store-release.ymlindex 401e62f3be..707cdbef6d 100644--- a/.github/workflows/ios-app-store-release.yml+++ b/.github/workflows/ios-app-store-release.yml@@ -83,13 +83,14 @@ jobs:# native_tree_fetch <sha>: make a commit that is not in this checkout (a new# PR head, GitHub's test merge commit, the pre-push head) available to- # native_tree_hash. Checkouts here don't persist credentials, so authenticate- # the way actions/checkout does. Fails if the commit is unreachable (a- # force-pushed-away head).+ # native_tree_hash. Some callers persist actions/checkout credentials; clear+ # inherited headers before adding ours so Git sends Authorization exactly once.+ # Fails if the commit is unreachable (a force-pushed-away head).native_tree_fetch() {local authauth=$(printf 'x-access-token:%s' "$GH_TOKEN" | base64 | tr -d '\n')- git -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth}" \+ git -c "http.https://github.com/.extraheader=" \+ -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth}" \fetch -q --depth=1 origin "$1"}# ----------------------------------------------------------------------------@@ -380,13 +381,14 @@ jobs:# native_tree_fetch <sha>: make a commit that is not in this checkout (a new# PR head, GitHub's test merge commit, the pre-push head) available to- # native_tree_hash. Checkouts here don't persist credentials, so authenticate- # the way actions/checkout does. Fails if the commit is unreachable (a- # force-pushed-away head).+ # native_tree_hash. Some callers persist actions/checkout credentials; clear+ # inherited headers before adding ours so Git sends Authorization exactly once.+ # Fails if the commit is unreachable (a force-pushed-away head).native_tree_fetch() {local authauth=$(printf 'x-access-token:%s' "$GH_TOKEN" | base64 | tr -d '\n')- git -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth}" \+ git -c "http.https://github.com/.extraheader=" \+ -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth}" \fetch -q --depth=1 origin "$1"}# ----------------------------------------------------------------------------diff --git a/.github/workflows/ios-release-drift.yml b/.github/workflows/ios-release-drift.ymlindex 2b737bebbb..86113142ae 100644--- a/.github/workflows/ios-release-drift.yml+++ b/.github/workflows/ios-release-drift.yml@@ -70,13 +70,14 @@ jobs:# native_tree_fetch <sha>: make a commit that is not in this checkout (a new# PR head, GitHub's test merge commit, the pre-push head) available to- # native_tree_hash. Checkouts here don't persist credentials, so authenticate- # the way actions/checkout does. Fails if the commit is unreachable (a- # force-pushed-away head).+ # native_tree_hash. Some callers persist actions/checkout credentials; clear+ # inherited headers before adding ours so Git sends Authorization exactly once.+ # Fails if the commit is unreachable (a force-pushed-away head).native_tree_fetch() {local authauth=$(printf 'x-access-token:%s' "$GH_TOKEN" | base64 | tr -d '\n')- git -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth}" \+ git -c "http.https://github.com/.extraheader=" \+ -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth}" \fetch -q --depth=1 origin "$1"}# ----------------------------------------------------------------------------diff --git a/.github/workflows/ios-release-watch.yml b/.github/workflows/ios-release-watch.ymlindex 6115003ec6..9f395328ac 100644--- a/.github/workflows/ios-release-watch.yml+++ b/.github/workflows/ios-release-watch.yml@@ -151,13 +151,14 @@ jobs:# native_tree_fetch <sha>: make a commit that is not in this checkout (a new# PR head, GitHub's test merge commit, the pre-push head) available to- # native_tree_hash. Checkouts here don't persist credentials, so authenticate- # the way actions/checkout does. Fails if the commit is unreachable (a- # force-pushed-away head).+ # native_tree_hash. Some callers persist actions/checkout credentials; clear+ # inherited headers before adding ours so Git sends Authorization exactly once.+ # Fails if the commit is unreachable (a force-pushed-away head).native_tree_fetch() {local authauth=$(printf 'x-access-token:%s' "$GH_TOKEN" | base64 | tr -d '\n')- git -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth}" \+ git -c "http.https://github.com/.extraheader=" \+ -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth}" \fetch -q --depth=1 origin "$1"}# ----------------------------------------------------------------------------diff --git a/.github/workflows/web-app-check-main.yml b/.github/workflows/web-app-check-main.ymlindex cde4e7994d..dc480a699e 100644--- a/.github/workflows/web-app-check-main.yml+++ b/.github/workflows/web-app-check-main.yml@@ -680,13 +680,14 @@ jobs:# native_tree_fetch <sha>: make a commit that is not in this checkout (a new# PR head, GitHub's test merge commit, the pre-push head) available to- # native_tree_hash. Checkouts here don't persist credentials, so authenticate- # the way actions/checkout does. Fails if the commit is unreachable (a- # force-pushed-away head).+ # native_tree_hash. Some callers persist actions/checkout credentials; clear+ # inherited headers before adding ours so Git sends Authorization exactly once.+ # Fails if the commit is unreachable (a force-pushed-away head).native_tree_fetch() {local authauth=$(printf 'x-access-token:%s' "$GH_TOKEN" | base64 | tr -d '\n')- git -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth}" \+ git -c "http.https://github.com/.extraheader=" \+ -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth}" \fetch -q --depth=1 origin "$1"}# ----------------------------------------------------------------------------diff --git a/apps/web/AGENTS.md b/apps/web/AGENTS.mdindex 879ac21a4c..c2a88c4cd0 100644--- a/apps/web/AGENTS.md+++ b/apps/web/AGENTS.md@@ -116,6 +116,12 @@ the startup bundle, and Lexical nodes.## Notes- Don't shy away from pulling good examples into context. In the case of solid-primtiives/kobalte try reading documentation, or just temp clone into /tmp to reference+## iOS release signing++Follow [`docs/ios-releases.md`](docs/ios-releases.md) for App Store signing and+provisioning, including both extensions. The release script temporarily selects+manual export when a distribution certificate path is supplied.+## Desktop file dropsKeep `app.windows[].dragDropEnabled` false in `tauri/src-tauri/tauri.macos.conf.json`.diff --git a/apps/web/docs/ios-releases.md b/apps/web/docs/ios-releases.mdindex 0768a86632..3e97a5dc91 100644--- a/apps/web/docs/ios-releases.md+++ b/apps/web/docs/ios-releases.md@@ -13,6 +13,10 @@ be pushed to update before they receive that bundle.Four generated workflows (plus a gate job in the web app PR checks) and achecked-in `min-native-build.json` enforce this end to end.+Keep the iOS app named `macro` and retain its unbadged icon assets in+`tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset`; the Alpha+icon and app-name branding are Android-only.+## The flow for a PR with breaking native changes1. **`iOS Native Check`**, a job of the web app PR checks@@ -235,7 +239,16 @@ production OTLP proxy- optional `APPLE_DISTRIBUTION_CERTIFICATE_BASE64` /`APPLE_DISTRIBUTION_CERTIFICATE_PASSWORD` — a base64-encoded AppleDistribution `.p12`; without it the release workflow relies on Xcode- cloud signing through the API key.+ cloud signing through the API key. With it, the runner imports the+ identity and `prepare-signing` downloads (or creates) an App Store+ provisioning profile for every target, including both extensions,+ using that exact certificate. Export uses manual signing so Xcode does+ not request a cloud certificate. The key needs access to Certificates,+ Identifiers & Profiles. Profiles are reused until expired or invalid;+ replacing the certificate creates matching profiles on the next run.+ Temporary project/export settings are restored after the build, including+ failures. For local manual signing, import the `.p12` into Keychain first+ and set `APPLE_DISTRIBUTION_CERTIFICATE_PATH` and its password.- **GitHub secrets**:- `IOS_RELEASE_DOPPLER_TOKEN` — a Doppler service token with read access to`ios-release/prd`, used by the iOS workflowsdiff --git a/apps/web/scripts/ios-app-store.mjs b/apps/web/scripts/ios-app-store.mjsindex 24af988d18..0756dfa0d4 100644--- a/apps/web/scripts/ios-app-store.mjs+++ b/apps/web/scripts/ios-app-store.mjs@@ -42,6 +42,9 @@// bun scripts/ios-app-store.mjs status [--require-live] [--require-unused-build]// bun scripts/ios-app-store.mjs release-info// bun scripts/ios-app-store.mjs withdraw --pr <number>+// bun scripts/ios-app-store.mjs prepare-signing+// Installs profiles for APPLE_DISTRIBUTION_CERTIFICATE_PATH and selects+// manual export; ios-release.sh backs up/restores the project settings.//// release-info prints JSON for ios-bump-version.mjs: the highest build number// App Store Connect has seen (any version, TestFlight included), whether the@@ -74,6 +77,7 @@ import os from "node:os";import path from "node:path";import { exit } from "node:process";import { fileURLToPath } from "node:url";+import { prepareSigning } from "./ios-signing.mjs";const API_BASE = "https://api.appstoreconnect.apple.com";const POLL_INTERVAL_MS = 30_000;@@ -165,9 +169,9 @@ function parseArgs(argv) {}const [command, ...rest] = process.argv.slice(2);-if (!["wait-build", "submit", "status", "release-info", "withdraw"].includes(command ?? "")) {+if (!["wait-build", "submit", "status", "release-info", "withdraw", "prepare-signing"].includes(command ?? "")) {console.error(- "Usage: ios-app-store.mjs <wait-build|submit|status|release-info|withdraw> [flags]",+ "Usage: ios-app-store.mjs <wait-build|submit|status|release-info|withdraw|prepare-signing> [flags]",);exit(2);}@@ -322,6 +326,11 @@ async function api(pathname, { method = "GET", body, onError } = {}) {return response.status === 204 ? null : response.json();}+if (command === "prepare-signing") {+ await prepareSigning(api, appDir);+ exit(0);+}+const apps = await api(`/v1/apps?filter[bundleId]=${encodeURIComponent(bundleId)}`);const app = apps.data[0];if (!app) {diff --git a/apps/web/scripts/ios-native-env.sh b/apps/web/scripts/ios-native-env.shindex 3636cad7c0..822db252c9 100644--- a/apps/web/scripts/ios-native-env.sh+++ b/apps/web/scripts/ios-native-env.sh@@ -24,11 +24,14 @@ ios_resolve_toolchain() {ios_rustc="$(command -v "${RUSTC:-${CARGO_BUILD_RUSTC:-rustc}}")"ios_rust_target="${1:?Rust target is required}"ios_rust_libdir="$("$ios_rustc" --print target-libdir --target "$ios_rust_target")"- if ! compgen -G "$ios_rust_libdir/libstd-*.rlib" > /dev/null; then- echo "The active Rust toolchain is missing $ios_rust_target: $ios_rust_libdir" >&2- echo "Re-enter nix develop to load the updated rust-toolchain.toml, or install the target with rustup if building outside Nix." >&2- exit 1- fi+ # Nix's noninteractive Bash omits compgen; use ordinary globbing instead.+ local ios_stdlib+ for ios_stdlib in "$ios_rust_libdir"/libstd-*.rlib; do+ [[ -f "$ios_stdlib" ]] && return 0+ done+ echo "The active Rust toolchain is missing $ios_rust_target: $ios_rust_libdir" >&2+ echo "Re-enter nix develop to load the updated rust-toolchain.toml, or install the target with rustup if building outside Nix." >&2+ exit 1}ios_activate_toolchain() {diff --git a/apps/web/scripts/ios-native-env.test.ts b/apps/web/scripts/ios-native-env.test.tsnew file mode 100644index 0000000000..cf58f5f22b--- /dev/null+++ b/apps/web/scripts/ios-native-env.test.ts@@ -0,0 +1,75 @@+import { spawnSync } from 'node:child_process';+import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs';+import { tmpdir } from 'node:os';+import { join } from 'node:path';+import { fileURLToPath } from 'node:url';+import { expect, test } from 'vitest';++const script = fileURLToPath(new URL('./ios-native-env.sh', import.meta.url));++test.each([+ ['aarch64-apple-ios', 'library'],+ ['aarch64-apple-ios-sim', 'library'],+ ['aarch64-apple-ios', 'missing'],+ ['aarch64-apple-ios', 'directory'],+])('resolve %s with %s and no compgen builtin', (target, fixture) => {+ const directory = mkdtempSync(join(tmpdir(), 'ios-native-env-'));+ try {+ const developer = join(directory, 'Xcode.app', 'Contents', 'Developer');+ const libdir = join(directory, 'rust libraries', target);+ mkdirSync(join(developer, 'Platforms', 'iPhoneOS.platform'), {+ recursive: true,+ });+ mkdirSync(libdir, { recursive: true });+ if (fixture === 'library') writeFileSync(join(libdir, 'libstd-test.rlib'), '');+ if (fixture === 'directory') mkdirSync(join(libdir, 'libstd-test.rlib'));++ const result = spawnSync(+ 'bash',+ [+ '-euo',+ 'pipefail',+ '-c',+ `+# Reproduce Nix's Bash, which has no programmable-completion builtins.+enable -n compgen 2>/dev/null || true+function /usr/bin/xcrun() { printf '/fixture/%s\\n' "$4"; }+cargo() { :; }+rustc() {+ [[ "$*" == "--print target-libdir --target $TEST_TARGET" ]]+ printf '%s\\n' "$TEST_LIBDIR"+}+source "$1"+ios_resolve_toolchain "$TEST_TARGET"+printf 'resolved %s\\n' "$ios_rust_target"+`,+ 'ios-native-env-test',+ script,+ ],+ {+ env: {+ ...process.env,+ BASH_ENV: undefined,+ ENV: undefined,+ DEVELOPER_DIR: developer,+ RUSTC: 'rustc',+ TEST_LIBDIR: libdir,+ TEST_TARGET: target,+ },+ encoding: 'utf8',+ }+ );+ if (fixture === 'library') {+ expect(result.stderr).toBe('');+ expect(result.status).toBe(0);+ expect(result.stdout).toBe(`resolved ${target}\n`);+ } else {+ expect(result.status).toBe(1);+ expect(result.stderr).toContain(`missing ${target}: ${libdir}`);+ expect(result.stdout).toBe('');+ }+ expect(result.stderr).not.toContain('compgen: command not found');+ } finally {+ rmSync(directory, { recursive: true, force: true });+ }+});diff --git a/apps/web/scripts/ios-release.sh b/apps/web/scripts/ios-release.shindex 70c9a88df2..c186b4255e 100755--- a/apps/web/scripts/ios-release.sh+++ b/apps/web/scripts/ios-release.sh@@ -110,6 +110,26 @@ echo "Releasing $BUNDLE_ID $MARKETING_VERSION ($BUILD_NUMBER)"step "Preparing iOS project"just ios-prepare+# The imported .p12 alone does not disable Xcode cloud signing. Download a+# matching App Store profile for every target and explicitly select manual+# export. Restore tracked project settings even if preparation/build fails.+signing_backup=""+restore_signing() {+ if [[ -n "$signing_backup" ]]; then+ cp "$signing_backup/project.pbxproj" tauri/src-tauri/gen/apple/app.xcodeproj/project.pbxproj+ cp "$signing_backup/ExportOptions.plist" tauri/src-tauri/gen/apple/ExportOptions.plist+ rm -rf "$signing_backup"+ signing_backup=""+ fi+}+if [[ -n "${APPLE_DISTRIBUTION_CERTIFICATE_PATH:-}" ]]; then+ signing_backup="$(mktemp -d)"+ cp tauri/src-tauri/gen/apple/app.xcodeproj/project.pbxproj "$signing_backup/project.pbxproj"+ cp tauri/src-tauri/gen/apple/ExportOptions.plist "$signing_backup/ExportOptions.plist"+ trap restore_signing EXIT+ bun scripts/ios-app-store.mjs prepare-signing+fi+# Same split as ios-build.sh: the web/wasm build keeps its original toolchain,# Apple's tools take over only for the native build, and Tauri's build hook is# skipped because it has already run here.@@ -122,6 +142,7 @@ step "Archiving and exporting IPA (this takes a while)"ios_activate_toolchain(\cd tauri/src-tauri && "$ios_cargo" tauri ios build --export-method app-store-connect --ci \--config '{"build":{"beforeBuildCommand":"","frontendDist":"../../dist"}}')+restore_signingIPA="$(ls -t "$IPA_DIR"/*.ipa 2>/dev/null | head -1 || true)"[[ -n "$IPA" ]] || fail "No IPA found in $IPA_DIR after build."diff --git a/apps/web/scripts/ios-signing.mjs b/apps/web/scripts/ios-signing.mjsnew file mode 100644index 0000000000..5cb6a2cc46--- /dev/null+++ b/apps/web/scripts/ios-signing.mjs@@ -0,0 +1,138 @@+// Explicit App Store export signing for an imported distribution identity.+// Tauri derives signingStyle from the Xcode project, overriding ExportOptions.+import { execFileSync } from "node:child_process";+import { X509Certificate } from "node:crypto";+import { mkdirSync, readFileSync, writeFileSync } from "node:fs";+import os from "node:os";+import path from "node:path";++async function records(api, pathname) {+ const result = [];+ while (pathname) {+ const page = await api(pathname);+ result.push(...page.data);+ pathname = page.links?.next+ ? new URL(page.links.next).pathname + new URL(page.links.next).search+ : null;+ }+ return result;+}++export async function signingProfiles(api, identifiers, certificateId) {+ const profiles = await records(+ api,+ "/v1/profiles?filter[profileType]=IOS_APP_STORE&include=bundleId,certificates&limit=200",+ );+ const selected = {};+ for (const identifier of identifiers) {+ // Apple's identifier filter also returns extensions when querying the app.+ const bundles = await records(+ api,+ `/v1/bundleIds?filter[identifier]=${encodeURIComponent(identifier)}&limit=200`,+ );+ const bundle = bundles.find((record) => record.attributes.identifier === identifier);+ if (!bundle) throw new Error(`No registered Apple bundle ID for ${identifier}.`);+ let profile = profiles.find((record) =>+ record.attributes.profileState === "ACTIVE" &&+ Date.parse(record.attributes.expirationDate) > Date.now() &&+ record.relationships.bundleId.data?.id === bundle.id &&+ record.relationships.certificates.data?.some((cert) => cert.id === certificateId),+ );+ if (!profile) {+ profile = (await api("/v1/profiles", {+ method: "POST",+ body: {+ data: {+ type: "profiles",+ attributes: {+ name: `Macro CI ${identifier} ${certificateId} ${Date.now()}`,+ profileType: "IOS_APP_STORE",+ },+ relationships: {+ bundleId: { data: { type: "bundleIds", id: bundle.id } },+ certificates: { data: [{ type: "certificates", id: certificateId }] },+ },+ },+ },+ })).data;+ }+ if (!profile.attributes.uuid || !profile.attributes.profileContent) {+ throw new Error(`Apple returned an incomplete provisioning profile for ${identifier}.`);+ }+ selected[identifier] = profile.attributes;+ }+ return selected;+}++export function manualSigningProject(project) {+ if (!/CODE_SIGN_STYLE = (Automatic|Manual);/.test(project)) {+ throw new Error("No CODE_SIGN_STYLE found in the generated Apple project.");+ }+ return project.replaceAll(/CODE_SIGN_STYLE = (Automatic|Manual);/g, "CODE_SIGN_STYLE = Manual;");+}++export async function prepareSigning(api, appDir) {+ const certificatePath = process.env.APPLE_DISTRIBUTION_CERTIFICATE_PATH;+ if (!certificatePath) throw new Error("APPLE_DISTRIBUTION_CERTIFICATE_PATH is required.");+ // Only the public certificate leaves openssl; the password stays in its env.+ const pem = execFileSync(+ "/usr/bin/openssl",+ ["pkcs12", "-in", certificatePath,+ "-passin", "env:APPLE_DISTRIBUTION_CERTIFICATE_PASSWORD", "-clcerts", "-nokeys"],+ { stdio: ["ignore", "pipe", "pipe"] },+ );+ const certificate = new X509Certificate(pem);+ const certificates = await records(api, "/v1/certificates?limit=200");+ const registered = certificates.find((record) =>+ record.attributes.certificateType === "DISTRIBUTION" &&+ new X509Certificate(Buffer.from(record.attributes.certificateContent, "base64"))+ .fingerprint === certificate.fingerprint,+ );+ if (!registered || Date.parse(registered.attributes.expirationDate) <= Date.now()) {+ throw new Error("The supplied Apple Distribution certificate is expired or not registered with this API key's team.");+ }+ const team = certificate.subject.match(/(?:^|\n)OU=([^\n]+)/)?.[1];+ if (!team) throw new Error("The distribution certificate has no team identifier.");++ const projectDir = path.join(appDir, "tauri/src-tauri/gen/apple");+ const projectPath = path.join(projectDir, "app.xcodeproj/project.pbxproj");+ const project = readFileSync(projectPath, "utf8");+ const identifiers = [...new Set(+ [...project.matchAll(/PRODUCT_BUNDLE_IDENTIFIER = "?([^";]+)"?;/g)]+ .map((match) => match[1]),+ )];+ if (!identifiers.length) throw new Error("No bundle identifiers found in the Apple project.");+ const profiles = await signingProfiles(api, identifiers, registered.id);+ const directory = path.join(os.homedir(), "Library/Developer/Xcode/UserData/Provisioning Profiles");+ mkdirSync(directory, { recursive: true, mode: 0o700 });+ for (const [identifier, profile] of Object.entries(profiles)) {+ writeFileSync(+ path.join(directory, `${profile.uuid}.mobileprovision`),+ Buffer.from(profile.profileContent, "base64"),+ { mode: 0o600 },+ );+ console.log(`App Store profile for ${identifier}: ${profile.name}`);+ }+ const exportPath = path.join(projectDir, "ExportOptions.plist");+ const options = JSON.parse(execFileSync(+ "/usr/bin/plutil",+ ["-convert", "json", "-o", "-", exportPath],+ { encoding: "utf8" },+ ));+ Object.assign(options, {+ signingStyle: "manual",+ signingCertificate: certificate.fingerprint.replaceAll(":", ""),+ teamID: team,+ provisioningProfiles: Object.fromEntries(+ Object.entries(profiles).map(([identifier, profile]) => [identifier, profile.uuid]),+ ),+ });+ const plist = execFileSync(+ "/usr/bin/plutil",+ ["-convert", "xml1", "-o", "-", "--", "-"],+ { input: JSON.stringify(options) },+ );+ writeFileSync(projectPath, manualSigningProject(project));+ writeFileSync(exportPath, plist);+ console.log(`Prepared manual App Store export for team ${team}.`);+}diff --git a/apps/web/scripts/ios-signing.test.ts b/apps/web/scripts/ios-signing.test.tsnew file mode 100644index 0000000000..a729e888a0--- /dev/null+++ b/apps/web/scripts/ios-signing.test.ts@@ -0,0 +1,107 @@+import { readFileSync } from 'node:fs';+import { expect, test, vi } from 'vitest';+import { manualSigningProject, signingProfiles } from './ios-signing.mjs';++const identifiers = [+ 'com.macro.app.prod',+ 'com.macro.app.prod.ShareExtension',+ 'com.macro.app.prod.NotificationServiceExtension',+];+const bundles = identifiers.map((identifier, index) => ({+ id: `bundle-${index}`,+ attributes: { identifier },+}));+const profiles = bundles.map((bundle, index) => ({+ id: `profile-${index}`,+ attributes: {+ profileState: 'ACTIVE',+ expirationDate: '2099-01-01T00:00:00Z',+ uuid: `uuid-${index}`,+ profileContent: Buffer.from(`signed profile ${index}`).toString('base64'),+ },+ relationships: {+ bundleId: { data: { id: bundle.id } },+ certificates: { data: [{ id: 'distribution-cert' }] },+ },+}));++test('reuses all three profiles and matches exact identifiers across API pages', async () => {+ const api = vi.fn(async (url: string) => {+ if (url.startsWith('/v1/profiles?')) {+ return {+ data: profiles.slice(0, 1),+ links: { next: 'https://api.appstoreconnect.apple.com/v1/profiles-page-2' },+ };+ }+ if (url === '/v1/profiles-page-2') return { data: profiles.slice(1) };+ if (url.startsWith('/v1/bundleIds?')) {+ // Root identifier lookup includes both extensions, before the root.+ return { data: [...bundles].reverse() };+ }+ throw new Error(`Unexpected request: ${url}`);+ });+ const result = await signingProfiles(api, identifiers, 'distribution-cert');+ expect(Object.keys(result)).toEqual(identifiers);+ expect(identifiers.map((identifier) => result[identifier].uuid)).toEqual([+ 'uuid-0', 'uuid-1', 'uuid-2',+ ]);+ expect(api.mock.calls.some(([url]) => url === '/v1/profiles')).toBe(false);+});++test.each(['expired', 'invalid', 'wrong-certificate', 'missing'])(+ 'creates a replacement for a %s profile with the supplied certificate',+ async (reason) => {+ const existing = structuredClone(profiles[0]);+ if (reason === 'expired') existing.attributes.expirationDate = '2000-01-01';+ if (reason === 'invalid') existing.attributes.profileState = 'INVALID';+ if (reason === 'wrong-certificate') {+ existing.relationships.certificates.data = [{ id: 'other-cert' }];+ }+ const api = vi.fn(async (url: string) => {+ if (url.startsWith('/v1/profiles?')) {+ return { data: reason === 'missing' ? [] : [existing] };+ }+ if (url.startsWith('/v1/bundleIds?')) return { data: bundles };+ if (url === '/v1/profiles') return { data: profiles[0] };+ throw new Error(`Unexpected request: ${url}`);+ });+ await signingProfiles(api, [identifiers[0]], 'distribution-cert');+ expect(api).toHaveBeenCalledWith('/v1/profiles', {+ method: 'POST',+ body: {+ data: {+ type: 'profiles',+ attributes: {+ name: expect.stringContaining(identifiers[0]),+ profileType: 'IOS_APP_STORE',+ },+ relationships: {+ bundleId: { data: { type: 'bundleIds', id: 'bundle-0' } },+ certificates: { data: [{ type: 'certificates', id: 'distribution-cert' }] },+ },+ },+ },+ });+ }+);++test('does not provision a prefix match when the exact bundle is missing', async () => {+ const api = vi.fn(async (url: string) => ({+ data: url.startsWith('/v1/profiles?') ? [] : bundles.slice(1),+ }));+ await expect(signingProfiles(api, [identifiers[0]], 'distribution-cert'))+ .rejects.toThrow('No registered Apple bundle ID');+ expect(api.mock.calls.some(([url]) => url === '/v1/profiles')).toBe(false);+});++test('switches every checked-in target to manual so Tauri cannot override the export style', () => {+ const project = readFileSync(new URL(+ '../tauri/src-tauri/gen/apple/app.xcodeproj/project.pbxproj', import.meta.url+ ), 'utf8');+ const manual = manualSigningProject(project);+ expect(manual).not.toContain('CODE_SIGN_STYLE = Automatic;');+ expect(manual.match(/CODE_SIGN_STYLE = Manual;/g)).toHaveLength(6);+ expect(manual.replaceAll('CODE_SIGN_STYLE = Manual;', 'CODE_SIGN_STYLE = Automatic;'))+ .toBe(project);+ expect(manualSigningProject(manual)).toBe(manual);+});diff --git a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]index 2aa9b4538b..5e4056cdd8 100644Binary files a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] and b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]index ad81f86473..61396b8f0f 100644Binary files a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] and b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]index ad81f86473..61396b8f0f 100644Binary files a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] and b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]index da5efc7282..b44ae23c79 100644Binary files a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] and b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]index c922ebc1fb..6c47e446d6 100644Binary files a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] and b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]index 0480e38281..f5c81ec1e5 100644Binary files a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] and b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]index 0480e38281..f5c81ec1e5 100644Binary files a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] and b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]index 5021519851..f74a2691c9 100644Binary files a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] and b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]index ad81f86473..61396b8f0f 100644Binary files a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] and b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]index 66dc3d8bbf..5a8e7c3e9c 100644Binary files a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] and b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]index 66dc3d8bbf..5a8e7c3e9c 100644Binary files a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] and b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]index 003ca81673..e5559a7fd2 100644Binary files a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] and b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]index 20b73ac520..0d0d84efb2 100644Binary files a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] and b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]index 003ca81673..e5559a7fd2 100644Binary files a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] and b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]index 2969828f53..0faefa0ba7 100644Binary files a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] and b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]index 10112d57bf..9e2e255148 100644Binary files a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] and b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]index 2c530aa17b..8bef0f8fcd 100644Binary files a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] and b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected]index d103dc68ca..04528e9af1 100644Binary files a/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] and b/apps/web/tauri/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/[email protected] differdiff --git a/apps/web/tauri/src-tauri/gen/apple/NotificationServiceExtension/Info.plist b/apps/web/tauri/src-tauri/gen/apple/NotificationServiceExtension/Info.plistindex 674fd2958a..ed7a26e260 100644--- a/apps/web/tauri/src-tauri/gen/apple/NotificationServiceExtension/Info.plist+++ b/apps/web/tauri/src-tauri/gen/apple/NotificationServiceExtension/Info.plist@@ -19,7 +19,7 @@<key>CFBundleShortVersionString</key><string>2.0.10</string><key>CFBundleVersion</key>- <string>187</string>+ <string>189</string><key>NSExtension</key><dict><key>NSExtensionPointIdentifier</key>diff --git a/apps/web/tauri/src-tauri/gen/apple/ShareExtension/Info.plist b/apps/web/tauri/src-tauri/gen/apple/ShareExtension/Info.plistindex 9a6024bc1d..e4c43daf43 100644--- a/apps/web/tauri/src-tauri/gen/apple/ShareExtension/Info.plist+++ b/apps/web/tauri/src-tauri/gen/apple/ShareExtension/Info.plist@@ -19,7 +19,7 @@<key>CFBundleShortVersionString</key><string>2.0.10</string><key>CFBundleVersion</key>- <string>187</string>+ <string>189</string><key>LSApplicationQueriesSchemes</key><array><string>macro</string>diff --git a/apps/web/tauri/src-tauri/gen/apple/app_iOS/Info.plist b/apps/web/tauri/src-tauri/gen/apple/app_iOS/Info.plistindex 2063f39cbd..dd4f3f3612 100644--- a/apps/web/tauri/src-tauri/gen/apple/app_iOS/Info.plist+++ b/apps/web/tauri/src-tauri/gen/apple/app_iOS/Info.plist@@ -4,8 +4,6 @@<dict><key>CFBundleDevelopmentRegion</key><string>$(DEVELOPMENT_LANGUAGE)</string>- <key>CFBundleDisplayName</key>- <string>Macro Alpha</string><key>CFBundleExecutable</key><string>$(EXECUTABLE_NAME)</string><key>CFBundleIdentifier</key>@@ -30,7 +28,7 @@</dict></array><key>CFBundleVersion</key>- <string>187</string>+ <string>189</string><key>ITSAppUsesNonExemptEncryption</key><false/><key>LSApplicationQueriesSchemes</key>diff --git a/apps/web/tauri/src-tauri/gen/apple/project.yml b/apps/web/tauri/src-tauri/gen/apple/project.ymlindex 85b8afecbf..82b03bdebe 100644--- a/apps/web/tauri/src-tauri/gen/apple/project.yml+++ b/apps/web/tauri/src-tauri/gen/apple/project.yml@@ -48,7 +48,6 @@ targets:info:path: app_iOS/Info.plistproperties:- CFBundleDisplayName: Macro AlphaLSRequiresIPhoneOS: trueUILaunchStoryboardName: LaunchScreenUIRequiredDeviceCapabilities: [arm64, metal]@@ -60,7 +59,7 @@ targets:- UIInterfaceOrientationLandscapeLeft- UIInterfaceOrientationLandscapeRightCFBundleShortVersionString: 2.0.10- CFBundleVersion: "187"+ CFBundleVersion: "189"# Exempt encryption only (HTTPS / OS crypto): answers App Store# Connect's export-compliance questionnaire for every build. Keep in# sync with src-tauri/Info.ios.plist.@@ -147,7 +146,7 @@ targets:properties:CFBundleDisplayName: Share to MacroCFBundleShortVersionString: 2.0.10- CFBundleVersion: "187"+ CFBundleVersion: "189"LSApplicationQueriesSchemes:- macroNSExtension:@@ -182,7 +181,7 @@ targets:properties:CFBundleDisplayName: NotificationServiceExtensionCFBundleShortVersionString: 2.0.10- CFBundleVersion: "187"+ CFBundleVersion: "189"NSExtension:NSExtensionPointIdentifier: com.apple.usernotifications.serviceNSExtensionPrincipalClass: $(PRODUCT_MODULE_NAME).NotificationServicediff --git a/apps/web/tauri/src-tauri/tauri.ios.conf.json b/apps/web/tauri/src-tauri/tauri.ios.conf.jsonindex f3423c38ef..2aa2cf6eb7 100644--- a/apps/web/tauri/src-tauri/tauri.ios.conf.json+++ b/apps/web/tauri/src-tauri/tauri.ios.conf.json@@ -3,7 +3,7 @@"version": "2.0.10","bundle": {"iOS": {- "bundleVersion": "187"+ "bundleVersion": "189"}}}diff --git a/nix/cloud-storage.nix b/nix/cloud-storage.nixindex 30124503d4..d80cd27feb 100644--- a/nix/cloud-storage.nix+++ b/nix/cloud-storage.nix@@ -925,7 +925,9 @@cargo-nextestcargo-expandbinaryen- wasm-bindgen-cli+ # Match Cargo.lock so parallel wasm-pack builds do not race to+ # install a replacement CLI into their shared cache.+ wasm-bindgen-cli_0_2_126wasm-packpkg-configbacondiff --git a/tooling/xtask/crates/xtask_workflows/src/workflows/scripts/ios_native_tree.sh b/tooling/xtask/crates/xtask_workflows/src/workflows/scripts/ios_native_tree.shindex 290b4f4c77..92db084f7c 100644--- a/tooling/xtask/crates/xtask_workflows/src/workflows/scripts/ios_native_tree.sh+++ b/tooling/xtask/crates/xtask_workflows/src/workflows/scripts/ios_native_tree.sh@@ -40,13 +40,14 @@ cache_wasm_version() {# native_tree_fetch <sha>: make a commit that is not in this checkout (a new# PR head, GitHub's test merge commit, the pre-push head) available to-# native_tree_hash. Checkouts here don't persist credentials, so authenticate-# the way actions/checkout does. Fails if the commit is unreachable (a-# force-pushed-away head).+# native_tree_hash. Some callers persist actions/checkout credentials; clear+# inherited headers before adding ours so Git sends Authorization exactly once.+# Fails if the commit is unreachable (a force-pushed-away head).native_tree_fetch() {local authauth=$(printf 'x-access-token:%s' "$GH_TOKEN" | base64 | tr -d '\n')- git -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth}" \+ git -c "http.https://github.com/.extraheader=" \+ -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth}" \fetch -q --depth=1 origin "$1"}# ----------------------------------------------------------------------------diff --git a/tooling/xtask/crates/xtask_workflows/src/workflows/web_app_check_main/test.rs b/tooling/xtask/crates/xtask_workflows/src/workflows/web_app_check_main/test.rsindex 7d47963c6c..601c254305 100644--- a/tooling/xtask/crates/xtask_workflows/src/workflows/web_app_check_main/test.rs+++ b/tooling/xtask/crates/xtask_workflows/src/workflows/web_app_check_main/test.rs@@ -361,3 +361,84 @@ fn test_job_keeps_vitest_module_cache_on_the_cache_volume() {"vitest writes its module cache to the mounted path: {test_job}");}++/// Exercise Git's actual HTTP header handling with and without checkout's+/// persisted credentials. The local endpoint records the request, then rejects+/// it: fetching repository objects is irrelevant to this authentication test.+#[test]+fn native_tree_fetch_sends_one_authorization_header() {+ use std::io::{BufRead, BufReader, Write};+ use std::net::TcpListener;+ use std::process::Command;++ for persisted in [false, true] {+ let repo = tempfile::tempdir().expect("temporary checkout");+ let listener = TcpListener::bind("127.0.0.1:0").expect("local HTTP endpoint");+ let url = format!(+ "http://{}/",+ listener.local_addr().expect("endpoint address")+ );+ let script =+ include_str!("../scripts/ios_native_tree.sh").replace("https://github.com/", &url);+ let (sender, receiver) = std::sync::mpsc::channel();+ std::thread::spawn(move || {+ let (mut socket, _) = listener.accept().expect("Git HTTP request");+ socket+ .set_read_timeout(Some(std::time::Duration::from_secs(10)))+ .expect("request timeout");+ let mut headers = Vec::new();+ for line in BufReader::new(&socket).lines() {+ let line = line.expect("HTTP request line");+ if line.is_empty() {+ break;+ }+ if line.to_ascii_lowercase().starts_with("authorization:") {+ headers.push(line);+ }+ }+ socket+ .write_all(+ b"HTTP/1.1 400 Bad Request\r\nContent-Length: 0\r\nConnection: close\r\n\r\n",+ )+ .expect("reject request after capturing headers");+ sender.send(headers).expect("send captured headers");+ });+ let output = Command::new("bash")+ .arg("-c")+ .arg(format!(+ r#"set -euo pipefail+git init -q+git remote add origin "$TEST_URL"+if [[ "$TEST_PERSISTED" == true ]]; then+ git config "http.${{TEST_URL}}.extraheader" "AUTHORIZATION: basic checkout-token"+fi+{script}+native_tree_fetch HEAD+"#+ ))+ .current_dir(repo.path())+ // CI's BASH_ENV reloads the Nix dev shell; its library path can+ // make the runner's host git-remote-http fail before connecting.+ .env_remove("BASH_ENV")+ .env_remove("LD_LIBRARY_PATH")+ .env("TEST_URL", &url)+ .env("TEST_PERSISTED", persisted.to_string())+ .env("GH_TOKEN", "test-token")+ .env("GIT_CONFIG_GLOBAL", "/dev/null")+ .env("GIT_CONFIG_NOSYSTEM", "1")+ .env("NO_PROXY", "127.0.0.1")+ .output()+ .expect("run native tree fetch");+ assert!(!output.status.success(), "fixture rejects the fetch");+ assert_eq!(+ receiver+ .recv_timeout(std::time::Duration::from_secs(10))+ .unwrap_or_else(|error| panic!(+ "Git must send an HTTP request: {error}; stderr: {}",+ String::from_utf8_lossy(&output.stderr)+ )),+ ["AUTHORIZATION: basic eC1hY2Nlc3MtdG9rZW46dGVzdC10b2tlbg=="],+ "persisted credentials: {persisted}"+ );+ }+}