2

An existing Flutter project, built and archived many times before.

After upgrading Xcode to 14.3, while trying to archive the project, I get the following error:

Command PhaseScriptExecution failed with a nonzero exit code

Tried to clean, update pods etc. Nothing helps...

Any ideas?

user6097845
  • 1,257
  • 1
  • 15
  • 33
  • Just checked flutter code once again, may be it shows any error in code. – ankushlokhande Mar 31 '23 at 18:25
  • we get this error `ios/../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/openssl_grpc.f ramework" failed: No such file or directory (2)` when trying to archive – Romk1n Mar 31 '23 at 18:45

2 Answers2

14

Just modified the frameworks.sh in my Project adding the "-f" and pressed "Archive" in XCode, so it worked again.

/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh

if [ -L "${source}" ]; then
    echo "Symlinked..."
    source="$(readlink -f "${source}")"
  fi
mirkancal
  • 4,762
  • 7
  • 37
  • 75
aXXy
  • 358
  • 3
  • 10
3

From the Apple Developer Forums

Workaround is to update all the generated ...-frameworks.sh files to add the -f flag to the call to readlink. In other words, need to replace:

source="$(readlink "${source}")"

with

source="$(readlink -f "${source}")"

Seems this is CocoaPods issue...

Machavity
  • 30,841
  • 27
  • 92
  • 100
Gerges Eid
  • 1,031
  • 12
  • 18