"${PODS_ROOT}/SwiftLint/swiftlint" causes "Command PhaseScriptExecution failed with a nonzero exit code" with Xcode 10

Its because of Keychain Access.

  • Open Keychain Access
  • Right Click Login Tab
  • Lock Keychain Login
  • Right Click Login Tab again
  • Unlock Keychain Login

and problem solved :)


It seems to be an issue with the SwiftLint 0.26.0 script when using Xcode 10.0 beta 3 or newer.

Cause

It seems related to SwiftLint #2276, itself related to SourceKitten 0.21.0, fixed in SourceKitten 0.21.1 and SwiftLint Master.

Solution

Update to SwiftLint 0.27.0 or newer:

pod 'SwiftLint', '~> 0.27'

(and run pod update SwiftLint)


Some Framework or SDK require Code Signing.

I done code signing and resolved the problem for me.enter image description here