From 42fa2756e79290c0aeae612cf14380c15878dad9 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Tue, 3 Dec 2024 08:54:59 +0100 Subject: [PATCH] feat(cli): clean Xcode Simulator cache (#3439) --- .changeset/late-cheetahs-heal.md | 6 ++++++ packages/cli/src/clean.ts | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .changeset/late-cheetahs-heal.md diff --git a/.changeset/late-cheetahs-heal.md b/.changeset/late-cheetahs-heal.md new file mode 100644 index 000000000..b6e343910 --- /dev/null +++ b/.changeset/late-cheetahs-heal.md @@ -0,0 +1,6 @@ +--- +"@rnx-kit/cli": patch +--- + +Add ability to clean Xcode Simulator cache. Fixes issues with `launchd_sim` +crashing or not responding when trying to boot a simulator. diff --git a/packages/cli/src/clean.ts b/packages/cli/src/clean.ts index ae3f443f1..010ce13c8 100644 --- a/packages/cli/src/clean.ts +++ b/packages/cli/src/clean.ts @@ -123,6 +123,13 @@ export async function rnxClean( action: () => execute("watchman", ["watch-del-all"]), }, ], + xcode: [ + { + label: "Clean Xcode Simulator cache", + action: () => + cleanDir(`${os.homedir()}/Library/Developer/CoreSimulator/Caches`), + }, + ], yarn: [ { label: "Clean Yarn cache", @@ -180,7 +187,7 @@ export const rnxCleanCommand = { description: "Clears React Native project related caches", options: [ { - name: "--include ", + name: "--include ", description: "Comma-separated flag of caches to clear e.g., `npm,yarn`", default: "metro,watchman", },