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

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay