From 2f7b74795a3421653e8d05938165cc4ba7a2a9c9 Mon Sep 17 00:00:00 2001 From: Evan Kaloudis Date: Sat, 20 Jun 2026 11:33:12 -0400 Subject: [PATCH] ci: reset stale CocoaPods trunk repo on Xcode Cloud workers --- ios/ci_scripts/ci_post_clone.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ios/ci_scripts/ci_post_clone.sh b/ios/ci_scripts/ci_post_clone.sh index 8b0fc1c08..8d4ca928c 100755 --- a/ios/ci_scripts/ci_post_clone.sh +++ b/ios/ci_scripts/ci_post_clone.sh @@ -16,6 +16,18 @@ brew install yarn # Install dependencies echo "===== Running yarn install =====" yarn install + +# Reset stale CocoaPods spec-repo state from cached Xcode Cloud worker +# images. The Homebrew CocoaPods 1.16+ wants the trunk source registered +# as a CDN, but a pre-existing `~/.cocoapods/repos/trunk` from older +# installs makes `pod install` abort with: +# [!] Unable to add a source with url `https://cdn.cocoapods.org/` +# named `trunk`. +# Wiping the dir and explicitly registering the CDN source up front +# makes the install path deterministic on every run. +rm -rf "$HOME/.cocoapods/repos/trunk" 2>/dev/null || true +pod repo add-cdn trunk https://cdn.cocoapods.org/ 2>/dev/null || true + echo "===== Running pod install =====" cd ios pod install