DEV Community

Ichi
Ichi

Posted on

Build is possible but Archive fails when using CocoaPods in Xcode

I've no knowledge of Swift or Xcode at all, this is a reminder. (It may not be a fundamental solution, but it is a first aid measure.)

I got the following error and investigated it thoroughly.

Image description

sent 29 bytes received 20 bytes 98.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at /AppleInternal/Library/BuildRoots/hogehogehogehoge/Library/Caches/com.apple.xbs /Sources/rsync/rsync/main.c(996) [sender=2.6.9].
Command PhaseScriptExecution failed with a nonzero exit code
Enter fullscreen mode Exit fullscreen mode

I looked through StackOverflow and couldn't figure out what was going on. But I found a way to archive the files.
Fix the following part of /Pods/Target Support Files/{Proj Name}/Pods-{Proj Name}-frameworks.sh.

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

Image description

Top comments (0)