使用Xcode 10"$ {PODS_ROOT}/SwiftLint/swiftlint"导致"命令PhaseScriptExecution失败并返回非零退出代码"

Cœu*_*œur 40 xcode swift swiftlint xcode10

从Xcode 10.0 beta 2更新到Xcode 10.0 beta 3我现在在iOS项目的构建时遇到此错误:

sourcekit:[1:connection-event-handler:10499:0.0000] Connection interrupttsourcekit:[1:updateSemanticEditorDelay:10499:0.0007]禁用10 secondssourcekit的语义编辑器:[1:pingService:10499:0.0007] pinging servicesourcekitten:连接SourceKitService恢复!
连接中断
永远不要为sourcekitd失败的文件调用此文件:file File + Cache.swift,第127行
/Users/Coeur/Library/Developer/Xcode/DerivedData/My-App-eloayqptodupvfhbyegtkncnhcpu/Build/Intermediates.noindex/My-App. build/UAT-iphonesimulator/My-App-Debug.build/Script-379156A71D62F5C100574D04.sh:第2行:34382中止陷阱:6"$ {PODS_ROOT}/SwiftLint/swiftlint"
命令PhaseScriptExecution失败并返回非零退出代码

Swift 4.1
CocoaPods 1.5.3
SwiftLint 0.26.0

Meh*_*YOL 80

因为Keychain Access.

  • 打开钥匙串访问
  • 右键单击登录选项卡
  • 锁钥匙扣登录
  • 右键单击"登录"选项卡
  • 解锁钥匙串登录

问题解决了:)


Cœu*_*œur 29

当使用Xcode 10.0 beta 3或更新版本时,使用SwiftLint 0.26.0脚本似乎是一个问题.

原因

它似乎与SwiftLint#2276有关,它本身与SourceKitten 0.21.0相关,在SourceKitten 0.21.1和SwiftLint Master 中修复.

更新到SwiftLint 0.27.0或更新版本:

pod 'SwiftLint', '~> 0.27'
Run Code Online (Sandbox Code Playgroud)

(并运行pod update SwiftLint)


Ash*_*iya 25

某些框架或SDK需要代码签名.

我完成了代码签名并为我解决了问题.在此输入图像描述


Cha*_*irA 19

我使用的pod没有为Xcode 10更新,所以对我有用的解决方案是从我的项目中删除Cocoapods然后再次安装(该项目是在Xcode 9上创建的).

要删除它,最简单的方法是:

$ sudo gem install cocoapods-deintegrate cocoapods-clean
$ pod deintegrate
$ pod clean
Run Code Online (Sandbox Code Playgroud)

之后,再次安装pod.


小智 12

我刚刚重新开始使用我的Macbook,它确实有效.


小智 5

对我来说,在“构建设置 -> 有效架构”中添加 arm64 架构解决了这个问题。