Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
c686ec1
feat(init): reconcile native iOS configuration
seanperez29 Aug 21, 2026
801348d
fix(init): harden iOS native reconciliation
seanperez29 Aug 26, 2026
b35bada
fix(init): verify bundled iOS plist parsing
seanperez29 Aug 27, 2026
1456686
refactor(init): scope public key lookup to iOS
seanperez29 Aug 27, 2026
9107315
fix(deploy): distinguish native Apple readiness states
seanperez29 Aug 27, 2026
cde861b
fix(init): revalidate iOS identity before remote writes
seanperez29 Aug 27, 2026
7160170
fix(deploy): preserve disabled native Apple setup
seanperez29 Aug 27, 2026
aeac74c
fix(init): defer associated domain to linked key
seanperez29 Aug 27, 2026
dae3d90
fix(init): verify preserved Apple configuration
seanperez29 Aug 27, 2026
481df26
fix(init): prove SwiftUI root auth wiring
seanperez29 Aug 27, 2026
8f0cace
fix(init): detect email-link convenience flow
seanperez29 Aug 27, 2026
1b2c7d0
fix(init): tighten SwiftUI root proof
seanperez29 Aug 27, 2026
640d3de
fix(init): reject shadowed callback URLs
seanperez29 Aug 27, 2026
d5f1cea
fix(init): validate SDK graph during dry run
seanperez29 Aug 27, 2026
a90cb2a
fix(init): preserve prepared mutation boundaries
seanperez29 Aug 27, 2026
623d029
fix(init): account for every configure call
seanperez29 Aug 27, 2026
0f59292
test(init): cover wired runtime key sources
seanperez29 Aug 27, 2026
97b44b7
fix(init): require versioned Apple config writes
seanperez29 Aug 28, 2026
286716d
fix(init): preserve registration retry keys
seanperez29 Aug 28, 2026
fc1a4b1
fix(init): validate present Apple entitlements
seanperez29 Aug 28, 2026
003a1c1
fix(init): block malformed Apple entitlements
seanperez29 Aug 28, 2026
60c2f5c
fix(init): serialize registration retries
seanperez29 Aug 28, 2026
fe8ea70
test(init): declare complete runtime key evidence
seanperez29 Aug 28, 2026
8b2fbf4
fix(init): preserve associated domain service case
seanperez29 Aug 28, 2026
c710413
fix(init): exhaustively discover iOS mutation targets
seanperez29 Aug 28, 2026
b0de185
fix(init): revalidate satisfied iOS native plans
seanperez29 Aug 28, 2026
52c4b16
refactor(init): keep LocalSecrets integration read-only
seanperez29 Aug 28, 2026
a3e477a
fix(init): revalidate iOS application links
seanperez29 Aug 28, 2026
83cfb33
fix(init): recover before mutating iOS inspection
seanperez29 Aug 28, 2026
709fb5e
test(init): cover unused iOS key artifacts
seanperez29 Aug 28, 2026
6022281
docs(changeset): clarify iOS prebuilt scaffold
seanperez29 Aug 28, 2026
d0de8c5
fix(init): validate iOS native identities
seanperez29 Aug 28, 2026
8180dcd
fix(cli): suppress sensitive iOS reconciliation errors
seanperez29 Aug 28, 2026
0092465
fix(init): verify iOS Run scheme keys
seanperez29 Aug 28, 2026
faace9e
fix(cli): validate native settings responses
seanperez29 Aug 28, 2026
579659f
fix(init): revalidate iOS runtime keys before remote setup
seanperez29 Aug 28, 2026
141b7cc
fix(cli): validate native application responses
seanperez29 Aug 28, 2026
c9a5aa9
fix(init): report stale registration retry locks
seanperez29 Aug 29, 2026
1362ba2
fix(init): reject empty Bundle ID components
seanperez29 Aug 29, 2026
21eac9a
fix(init): reject invalid SwiftUI environment overloads
seanperez29 Aug 29, 2026
2c39864
refactor(ios): require app selection for custom keys
seanperez29 Aug 29, 2026
b2a25c2
refactor(ios): align custom app selection flow
seanperez29 Aug 29, 2026
2f5d7a6
refactor(ios): remove callback correctness inspection
seanperez29 Aug 29, 2026
d439a5f
refactor(ios): report explicit key state
seanperez29 Aug 29, 2026
d0a3333
fix(plapi): validate application responses
seanperez29 Aug 29, 2026
f223967
style(init): format Swift inspection
seanperez29 Aug 29, 2026
0131daa
fix(init): align dry-run target discovery
seanperez29 Aug 30, 2026
2256581
fix(init): support SwiftUI scene modifiers
seanperez29 Aug 30, 2026
e4203e2
fix(init): match Apple bundle IDs case-insensitively
seanperez29 Aug 30, 2026
2785377
fix(ios): normalize bundle identifier readiness
seanperez29 Aug 30, 2026
a86c44f
fix(init): bound Apple entitlement reads
seanperez29 Aug 31, 2026
6a47bef
refactor(init): extract Apple native coordinator
seanperez29 Aug 31, 2026
df59cd9
refactor(init): share native local setup planning
seanperez29 Aug 31, 2026
5f3eafe
refactor(init): reuse native setup proposal for guidance
seanperez29 Aug 31, 2026
e823584
docs(changeset): describe native iOS reconciliation
seanperez29 Aug 31, 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