“${PODS_ROOT}/SwiftLint/swiftlint” causes “Command

2020-02-02 17:37发布

Updating from Xcode 10.0 beta 2 to Xcode 10.0 beta 3 I now get this error at build time for an iOS project:

sourcekit: [1:connection-event-handler:10499: 0.0000] Connection interruptsourcekit: [1:updateSemanticEditorDelay:10499: 0.0007] disabling semantic editor for 10 secondssourcekit: [1:pingService:10499: 0.0007] pinging servicesourcekitten: connection to SourceKitService restored!
Connection interrupted
Never call this for file that sourcekitd fails.: file File+Cache.swift, line 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: line 2: 34382 Abort trap: 6 "${PODS_ROOT}/SwiftLint/swiftlint"
Command PhaseScriptExecution failed with a nonzero exit code

Swift 4.1
CocoaPods 1.5.3
SwiftLint 0.26.0

17条回答
Melony?
2楼-- · 2020-02-02 18:21

The pod that I was using was not updated for Xcode 10, so the solution that worked for me was to remove Cocoapods from my project and then installed again (the project was created on Xcode 9).

To remove it, the easiest way is:

$ sudo gem install cocoapods-deintegrate cocoapods-clean
$ pod deintegrate
$ pod clean

After that, install the pods again.

查看更多
ら.Afraid
3楼-- · 2020-02-02 18:23

Restarting Xcode 10.1 fixed it for me; arose while updating Cocoapods ('RxSwift').

查看更多
【Aperson】
4楼-- · 2020-02-02 18:25

I had an authentication process (outside of Xcode) running in the background which seemed to be causing this issue for me. I had the keychain dialog up asking for my password. Solution was to restart the machine.

查看更多
Viruses.
5楼-- · 2020-02-02 18:25

Solution worked for me

I deleted all pod generated files and folders as listed below

  • Podfile.lock
  • Pods folder
  • ProjectName.xcworkspace

Again install pod for this project.

Now open .xcworkspace. Build and run...

查看更多
在下西门庆
6楼-- · 2020-02-02 18:27

For me adding arm64 architecture in "Build Setting -> valid architectures" resolved the issue.

查看更多
登录 后发表回答