Skip to content

Commit

Permalink
feat(cli): clean Xcode Simulator cache (#3439)
Browse files Browse the repository at this point in the history
  • Loading branch information
tido64 authored Dec 3, 2024
1 parent 40a8284 commit 42fa275
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/late-cheetahs-heal.md
Original file line number Diff line number Diff line change
@@ -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.
9 changes: 8 additions & 1 deletion packages/cli/src/clean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -180,7 +187,7 @@ export const rnxCleanCommand = {
description: "Clears React Native project related caches",
options: [
{
name: "--include <android,cocoapods,metro,npm,watchman,yarn>",
name: "--include <android,cocoapods,metro,npm,watchman,xcode,yarn>",
description: "Comma-separated flag of caches to clear e.g., `npm,yarn`",
default: "metro,watchman",
},
Expand Down

0 comments on commit 42fa275

Please sign in to comment.