發(fā)布pods共用庫(kù) 提示 source_files pattern did not match any file

解決方案

1.首先pod spec lint podName.podspec --allow-warnings 看看能否驗(yàn)證成功

2.如果驗(yàn)證碼成功還是提示source_files pattern did not match any file 就說(shuō)明對(duì)應(yīng)的source_files下沒(méi)有找到對(duì)應(yīng)的文件

3.到/Users/用戶(hù)/Library/Caches/CocoaPods/Pods/External/.podspec文件名/035cb9aa62b9d49f904fad1119b83da4-aebfe 目錄下,自行創(chuàng)建對(duì)應(yīng)的文件夾和內(nèi)容。

4.pod repo push xxxPod? xxxpodspec --verbose --use-libraries --allow-warnings? 重試即可

還有一種情況情況你的podspec引用了一個(gè)沒(méi)有提交的source_files

1.檢查你的更新podspec 下的s.source?

2.嘗試更改為 spec.source = { :git => "https://github.com/theonelgq/LGQ_A_Category.git", :tag => "#{spec.version}" }


注意 如果生成庫(kù)成功后 pod search 不到自己的庫(kù)

執(zhí)行pod setup

終端輸入:pod setup

會(huì)出現(xiàn)Setting up CocoaPods master repo,稍等幾十秒,最底下會(huì)輸出Setup completed。說(shuō)明執(zhí)行pod setup成功。

如果pod search操作還是搜索失敗,如下:

終端輸入:pod search [podname]

輸出:Unable to find a pod with name, author, summary, or descriptionmatching [podname] 這時(shí)就需要繼續(xù)下面的步驟了。

刪除~/Library/Caches/CocoaPods目錄下的search_index.json文件

pod setup成功后,依然不能pod search,是因?yàn)橹澳銏?zhí)行pod search生成了search_index.json,此時(shí)需要?jiǎng)h掉。再搜索一下就可以了。

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

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