Command PhaseScriptExecution failed with a nonzero exit code for R.swift

1.6k Views Asked by At

Command PhaseScriptExecution failed with a nonzero exit code for R.swift

enter image description here

enter image description here

Does any one have faced this situation?

2

There are 2 best solutions below

0
On

TLDR; Update to the latest version of R.swift

This is a security warning from macOS, because the rswift executable your using wasn’t notarized. As of version 5.2.2 of R.swift, the executable is now fully notarized, so this problem shouldn’t happen anymore.

Note: when you install R.swift via CocoaPods, the quarantine bit isn’t set, so this warning doesn’t show up.

0
On

Answer Found from https://github.com/mac-cain13/R.swift#cocoapods-recommended

"$PODS_ROOT/R.swift/rswift" generate "$SRCROOT/R.generated.swift"

enter image description here

enter image description here

Hope it will help someone.