Sh 打包報錯:errSecInternalComponent 和 CopySwiftLibs

最近 Jenkins 打包又報錯了:git

Codesigning /Users/Shared/Jenkins/Home/workspace/***/build/DerivedData/Build/Intermediates.noindex/ArchiveIntermediates/***/InstallationBuildProductsLocation/Applications/***.app/Frameworks/libswiftCoreMedia.dylib
/usr/bin/codesign --force --sign 2A252DD1931364B8ED615013655551EEF4C66515 --verbose /Users/Shared/Jenkins/Home/workspace/***/***/build/DerivedData/Build/Intermediates.noindex/ArchiveIntermediates/***/InstallationBuildProductsLocation/Applications/***.app/Frameworks/libswiftCoreMedia.dylib
/Users/Shared/Jenkins/Home/workspace/***/***/build/DerivedData/Build/Intermediates.noindex/ArchiveIntermediates/***/InstallationBuildProductsLocation/Applications/***.app/Frameworks/libswiftCoreMedia.dylib: errSecInternalComponent

error: Failed with exit code 1

** ARCHIVE FAILED **


The following build commands failed:
	CopySwiftLibs /Users/Shared/Jenkins/Home/workspace/***/***/build/DerivedData/Build/Intermediates.noindex/ArchiveIntermediates/***/InstallationBuildProductsLocation/Applications/***.app
(1 failure)
複製代碼

緣由就是服務器證書沒有了,而後又從新建立了一個,可是導入進去以後就報錯。github

網上說法是:swift

出現errSecInternalComponent 多是xcode簽名機制(code signing mechanism) 的 bug, Xcode 中帳號多了,就會產生不少過時的PP文件,Xcode 沒有自帶刪除功能會致使重複導入provisioning profile. 解決辦法:xcode

Xcode 中全部的PP文件,都在 ~/Library/MobileDevice/Provisioning Profiles 這個文件夾下;進入該文件夾,刪除不須要的;從新導入新的 provisioning profilebash

二、重啓Mac服務器

可是這樣作以後沒有用,仍是報錯。app

最後參考這裏,ui

打開命令行終端,進入工程根目錄,運行命令 xattr -rc . 還不行就刪除下面目錄的項目: /Users/denny/Library/Developer/Xcode/DerivedData/spa

參考:stackoverflow.com/questions/2….net

xattr -rc . 用來刪除文件的擴展屬性。

並且把證書刪除,又從新導入了一遍,而後還把證書的信任設置改了下。

參考: github.com/fastlane/fa…
相關文章
相關標籤/搜索