CocoaPods常見問題


1.podfile拉取最新的了, podspec 庫,也 update 最新版本了,但是項目 pods 庫里依然拉取不到最新的:

解決:在 podfile 所在目錄里,作了更改,需要提交或者撤銷后才能拉取到最新的依賴配置.

2.更新到指定庫

例如:想要更新AF庫的時候
pod update AFNetworking --verbose --no-repo-update

3.通過命令行修改遠程地址

方法一:通過命令行修改遠程地址

cd json
git remote set-url origin https://gitee.com/jouypub/json.git

方法二:先刪除原有倉庫地址,然后添加新地址

cd json
git remote rm origin
git remote add origin https://gitee.com/jouypub/json.git

方法三:修改配置文件

cd json/.git
vim config
[core]
repositoryformatversion = 0
filemode = true
logallrefupdates = true
precomposeunicode = true

[remote "origin"]
  # 修改成新的倉庫地址
  url = https://gitee.com/jouypub/json.git
  fetch = +refs/heads/*:refs/remotes/origin/*

[branch "master"]
  remote = origin
  merge = refs/heads/master

4.invalid byte sequence in US-ASCII錯誤

在flutter項目中集成原生的阿里云視頻,需要手動添加Pods文件,項目使用XCODE啟動正常,但是使用VSCode 運行時一直報錯:

CocoaPods requires your terminal to be using UTF-8 encoding 
Consider adding the following to ~/.profile:
export LANG=en_US.UTF-8

解決方案: 終端打開~/.bash_profile (open ~/.bash_profile)
編輯并添加 export LANG=en_US.UTF-8
退出并保存
還可以運行該echo $LANG命令以查看變量是否已正確配置。
VSCODE 重新運行 若仍然顯示錯誤,退出vscode 重新啟動打開vscode。

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

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

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