Fastlane 問題記錄

fastlane安裝使用使用的教程很多,套路基本固定。此處僅記錄耗費了自己幾天時間的坑,以便后續(xù)方便查閱。有個感悟:有問題一定要看官方文檔以及issues,相信自己不是第一個遇到……

一:security: SecKeychainItemImport: The specified keychain could not be found. Could not install WWDR certificate
1、security list-keychains 可以查看所有keychain
使用該命令之后,我這邊的輸入是:

    "/Library/Developer/XcodeServer/Keychains/Portal.keychain"
    "/Users/XXX/Library/Keychains/login.keychain-db"
    "/Library/Keychains/System.keychain"

你會發(fā)現(xiàn)第一個Portal,keychain中沒有WWDR證書
所以根據(jù)fastlane issue中的方法將login-keychain-db(包含WWDR) 放在第一位,具體方法十分簡單

5B6E8C9C-F84F-4E55-B4AD-EEA09EF7BF8F.png

再使用 security list-keychains,login.keychain-db即在第一位了,感覺是fastlane代碼沒有寫的嚴謹

    "/Users/XXX/Library/Keychains/login.keychain-db"
    "/Library/Developer/XcodeServer/Keychains/Portal.keychain"
    "/Library/Keychains/System.keychain"

參考: https://github.com/fastlane/fastlane/issues/6993

記錄個命令:
security find-certificate -c 'Apple Worldwide Developer Relations Certification Authority'
可以查找某個證書的詳情

二:復用現(xiàn)有的證書
參考這邊文章即可: http://macoscope.com/blog/simplify-your-life-with-fastlane-match/#migration
上邊有詳細步驟
有個注意點,提交之前刪除其余p12、cer等文件,只留下 cert_id.cer和cert_.p12,否則 Passphrase for Git Repo 這一步過不去
還有openssl 的密碼要記住

三:Could not decrypt the repo, please make sure you enter the right password!
解決方法: 在Fastfile的 before_all方法中,添加 ENV["MATCH_PASSWORD"] = 密碼,示例: ENV["MATCH_PASSWORD"] = "123456"

四: ommand timed out after 10 seconds on try 1 of 4
原因: 很大可能是機器不給力了,使xcodebuild -showBuildSettings -workspace ./XX.xcworkspace -scheme XX -configuration Release 命令執(zhí)行超時
解決方法: 在Fastfile的 before_all方法中,添加 :

    ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "120"
    ENV["FASTLANE_XCODEBUILD_SETTINGS_RETRIES"] = "4"

也就是重置超時時間和重試次數(shù),可根據(jù)自己需要修改

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容