Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
9d0bfcc
feat(init): reconcile native iOS configuration
seanperez29 Aug 21, 2026
42ff9df
fix(init): harden iOS native reconciliation
seanperez29 Aug 26, 2026
d701402
fix(init): verify bundled iOS plist parsing
seanperez29 Aug 27, 2026
54a4487
refactor(init): scope public key lookup to iOS
seanperez29 Aug 27, 2026
ab96756
fix(deploy): distinguish native Apple readiness states
seanperez29 Aug 27, 2026
e279c5d
fix(init): revalidate iOS identity before remote writes
seanperez29 Aug 27, 2026
50498f9
fix(deploy): preserve disabled native Apple setup
seanperez29 Aug 27, 2026
53e2474
fix(init): defer associated domain to linked key
seanperez29 Aug 27, 2026
a88c6f6
fix(init): verify preserved Apple configuration
seanperez29 Aug 27, 2026
6fd5496
fix(init): prove SwiftUI root auth wiring
seanperez29 Aug 27, 2026
4483fca
fix(init): detect email-link convenience flow
seanperez29 Aug 27, 2026
8329045
fix(init): tighten SwiftUI root proof
seanperez29 Aug 27, 2026
c73e43a
fix(init): reject shadowed callback URLs
seanperez29 Aug 27, 2026
dca642b
fix(init): validate SDK graph during dry run
seanperez29 Aug 27, 2026
e8aae6d
fix(init): preserve prepared mutation boundaries
seanperez29 Aug 27, 2026
651fc07
fix(init): account for every configure call
seanperez29 Aug 27, 2026
c0ed8ba
test(init): cover wired runtime key sources
seanperez29 Aug 27, 2026
36fd1ce
fix(init): require versioned Apple config writes
seanperez29 Aug 28, 2026
deb6b95
fix(init): preserve registration retry keys
seanperez29 Aug 28, 2026
5b01740
fix(init): validate present Apple entitlements
seanperez29 Aug 28, 2026
a192035
fix(init): block malformed Apple entitlements
seanperez29 Aug 28, 2026
208eabb
fix(init): serialize registration retries
seanperez29 Aug 28, 2026
f569feb
test(init): declare complete runtime key evidence
seanperez29 Aug 28, 2026
87c2da6
fix(init): preserve associated domain service case
seanperez29 Aug 28, 2026
45d783f
fix(init): exhaustively discover iOS mutation targets
seanperez29 Aug 28, 2026
04b655c
fix(init): revalidate satisfied iOS native plans
seanperez29 Aug 28, 2026
b7ecd97
refactor(init): keep LocalSecrets integration read-only
seanperez29 Aug 28, 2026
4d7f658
fix(init): revalidate iOS application links
seanperez29 Aug 28, 2026
0ddccb2
fix(init): recover before mutating iOS inspection
seanperez29 Aug 28, 2026
1ef5755
test(init): cover unused iOS key artifacts
seanperez29 Aug 28, 2026
9c82a2f
docs(changeset): clarify iOS prebuilt scaffold
seanperez29 Aug 28, 2026
ed70db5
fix(init): validate iOS native identities
seanperez29 Aug 28, 2026
e1f59f7
fix(cli): suppress sensitive iOS reconciliation errors
seanperez29 Aug 28, 2026
b9ff2b7
fix(init): verify iOS Run scheme keys
seanperez29 Aug 28, 2026
2ff3c85
fix(cli): validate native settings responses
seanperez29 Aug 28, 2026
7a8296e
fix(init): revalidate iOS runtime keys before remote setup
seanperez29 Aug 28, 2026
17d6a37
fix(cli): validate native application responses
seanperez29 Aug 28, 2026
7457364
fix(init): report stale registration retry locks
seanperez29 Aug 29, 2026
105aa46
fix(init): reject empty Bundle ID components
seanperez29 Aug 29, 2026
28afa06
fix(init): reject invalid SwiftUI environment overloads
seanperez29 Aug 29, 2026
4ba29b8
refactor(ios): require app selection for custom keys
seanperez29 Aug 29, 2026
0cd22c2
refactor(ios): align custom app selection flow
seanperez29 Aug 29, 2026
b21fdd0
refactor(ios): remove callback correctness inspection
seanperez29 Aug 29, 2026
9dd16f8
refactor(ios): report explicit key state
seanperez29 Aug 29, 2026
c7749da
fix(plapi): validate application responses
seanperez29 Aug 29, 2026
083d835
style(init): format Swift inspection
seanperez29 Aug 29, 2026
4887bdf
fix(init): align dry-run target discovery
seanperez29 Aug 30, 2026
93ef269
fix(init): support SwiftUI scene modifiers
seanperez29 Aug 30, 2026
6c29124
fix(init): match Apple bundle IDs case-insensitively
seanperez29 Aug 30, 2026
bafae8d
fix(ios): normalize bundle identifier readiness
seanperez29 Aug 30, 2026
2fb8273
fix(init): bound Apple entitlement reads
seanperez29 Aug 31, 2026
9aa5459
refactor(init): extract Apple native coordinator
seanperez29 Aug 31, 2026
826f455
refactor(init): share native local setup planning
seanperez29 Aug 31, 2026
e0fe40d
refactor(init): reuse native setup proposal for guidance
seanperez29 Aug 31, 2026
4684d62
docs(changeset): describe native iOS reconciliation
seanperez29 Aug 31, 2026
8f6e458
test(native): align deployed endpoint contract
seanperez29 Sep 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/ios-native-reconciliation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"clerk": minor
---

Add native iOS application registration and optional AuthView and Sign in with Apple setup to `clerk init`.
28 changes: 27 additions & 1 deletion packages/cli-core/src/cli-program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import { maybeNotifyUpdate } from "./lib/update-check.ts";
import { CURRENT_VERSION } from "./lib/version.ts";
import { registerExtras } from "@clerk/cli-extras";
import {
discardCommandTelemetry,
finalizeAndSendTelemetry,
startCommandTelemetry,
telemetryResultForError,
Expand All @@ -61,6 +62,18 @@ export type Program = Command<[], { inputJson?: string; mode?: string; verbose?:

type CommandRegistrant = (program: Program) => void;

/**
* `init --dry-run` promises an invocation-wide read-only boundary. Keep the
* check here, outside the init action, so global hooks cannot send telemetry,
* fetch an update, or persist their caches around an otherwise read-only run.
*/
function isReadOnlyInitDryRun(actionCommand: {
name(): string;
getOptionValue(key: string): unknown;
}): boolean {
return actionCommand.name() === "init" && actionCommand.getOptionValue("dryRun") === true;
}

const registrants: CommandRegistrant[] = [
registerInit,
registerAuth,
Expand Down Expand Up @@ -109,8 +122,15 @@ export function createProgram(): Program {
.option("--verbose", "Show detailed output (enables debug messages)") as Program;

program.hook("preAction", async (_thisCommand, actionCommand) => {
const readOnlyInitDryRun = isReadOnlyInitDryRun(actionCommand);
// First so hook-time failures (e.g. invalid --mode) still produce an event.
startCommandTelemetry(actionCommand);
// A read-only iOS inspection is the exception: its boundary covers global
// command hooks as well as the init action itself.
if (readOnlyInitDryRun) {
discardCommandTelemetry();
} else {
startCommandTelemetry(actionCommand);
}
// Reset log level at the start of each command invocation so a previous
// --verbose doesn't leak into subsequent runs.
setLogLevel("info");
Expand All @@ -125,6 +145,11 @@ export function createProgram(): Program {
setMode(opts.mode as Mode);
}

// Environment selection only affects remote Clerk operations. Avoid even
// reading or rendering persisted CLI environment state for this local-only
// inspection path.
if (readOnlyInitDryRun) return;

// Initialize the active environment from persisted config
const envName = await getEnvironment();
if (envName && isValidEnv(envName)) {
Expand All @@ -150,6 +175,7 @@ export function createProgram(): Program {
// Show update notification after each command, except for commands that
// already perform their own version check (doctor, update).
program.hook("postAction", async (_thisCommand, actionCommand) => {
if (isReadOnlyInitDryRun(actionCommand)) return;
const cmdName = actionCommand.name();
if (cmdName === "doctor" || cmdName === "update") return;
await maybeNotifyUpdate(CURRENT_VERSION);
Expand Down
2 changes: 2 additions & 0 deletions packages/cli-core/src/commands/api/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ describe("api command", () => {
{
instance_id: "ins_dev",
environment_type: "development",
publishable_key: "pk_test_fixture",
secret_key: "sk_test_derived",
},
],
Expand Down Expand Up @@ -433,6 +434,7 @@ describe("api command", () => {
{
instance_id: "ins_dev",
environment_type: "development",
publishable_key: "pk_test_fixture",
secret_key: "sk_test_oauth",
},
],
Expand Down
8 changes: 7 additions & 1 deletion packages/cli-core/src/commands/config/pull.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,13 @@ describe("config pull", () => {
test("supports --app without a linked profile", async () => {
const mockApp = {
application_id: "app_1",
instances: [{ instance_id: "ins_dev", environment_type: "development" }],
instances: [
{
instance_id: "ins_dev",
environment_type: "development",
publishable_key: "pk_test_fixture",
},
],
};

stubFetch(async (input) => {
Expand Down
8 changes: 7 additions & 1 deletion packages/cli-core/src/commands/config/push.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,13 @@ describe("config push", () => {
return new Response(
JSON.stringify({
application_id: "app_1",
instances: [{ instance_id: "ins_dev", environment_type: "development" }],
instances: [
{
instance_id: "ins_dev",
environment_type: "development",
publishable_key: "pk_test_fixture",
},
],
}),
{ status: 200 },
);
Expand Down
8 changes: 7 additions & 1 deletion packages/cli-core/src/commands/config/schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,13 @@ describe("config schema", () => {
test("supports --app without a linked profile", async () => {
const mockApp = {
application_id: "app_1",
instances: [{ instance_id: "ins_dev", environment_type: "development" }],
instances: [
{
instance_id: "ins_dev",
environment_type: "development",
publishable_key: "pk_test_fixture",
},
],
};

stubFetch(async (input) => {
Expand Down
Loading
Loading