How to Fix Failed Archive on Xcode 14.3 (rsync error: some files could not be transferred (code 23))

Introduction

Have you updated Xcode to 14.3 and now your archive fails? If yes, you are reading the correct article. I'll share with you how I fixed failed Archive on Xcode 14.3.

The solution

When the archive failed you might have seen the rsync error below.

...
rsync error: some files could not be transferred (code 23) at /AppleInternal/Library/BuildRoots/97f6331a-ba75-11ed-a4bc-863efbbaf80d/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]
Command PhaseScriptExecution failed with a nonzero exit code

Fortunately, the fix is very simple, Open the file Pods/Targets Support Files/Pods-Runner/Pods-Runner-framework

Pod-Runner-framework location

Replace:

  if [ -L "${source}" ]; then
    echo "Symlinked..."
    source="$(readlink "${source}")"
  fi

with:

  if [ -L "${source}" ]; then
    echo "Symlinked..."
    source="$(readlink -f "${source}")"
  fi

The -f was added.

Your archive will now complete successfully.

Connect with me

Thank you for reading my post. Feel free to connect with me