CocoaPods 1.1.0上傳遇到swift問題


 

更新時間: 2016-11-25

1.出現如下信息:

Conn keep-alive

Updating spec repo `master`
  - Data URL: https://raw.githubusercontent.com/CocoaPods/Specs/4b1928e89d6cb01905d71fcc55c7726f13d5dadb/Specs/4/a/1/XLJScreenMatchings/1.1.3/XLJScreenMatchings.podspec.json
  - Log messages:
    - November 24th, 21:32: Push for `XLJScreenMatchings 1.1.3' initiated.
    - November 24th, 21:32: Push for `XLJScreenMatchings 1.1.3' has been pushed
    (0.202071984 s).

看到這些信息又不像以前的pod trunk push成功后的信息一樣。這不是重點,重點是當我搜索的時候出現如下問題:

➜  ScreenMatching git:(master) ✗ pod search XLJScreenMatchings                
[!] Unable to find a pod with name, author, summary, or description matching `XLJScreenMatchings`
➜  ScreenMatching git:(master) ✗

到這里就看不懂了,搞了很久,最后發現是搜索出了問題,解決方法.

rm ~/Library/Caches/CocoaPods/search_index.json

 

2. cocoapod錯誤 

問題:ERROR | [iOS] unknown: Encountered an unknown error (757: unexpected token at 

解決方法:

sudo xcode-select -s /Applications/Xcode.app

 

更新時間:2016-11-23

1. 遇到這樣的問題,解決方法是重新提交版本號:

[!] Unable to accept duplicate entry for: XLJScreenMatchings (1.0.0)

那么就在1.0.0的基礎上加一下就好了
git tag 1.0.1
git push --tag

2.一個刪除倉庫的命令:

pod repo remove [name]

 

3.一個更新cocoapods的命令:

sudo gem install -n /usr/local/bin cocoapods --pre

 4.CocoaPod推送報錯:pod trunk push --verbose

[!] CocoaPods was not able to update the `master` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`

處理方法:

pod repo update --verbose

 

 更新時遇到此錯誤,處理方法。 

[!] The spec did not pass validation, due to 1 error.

[!] The validator for Swift projects uses Swift 3.0 by default, if you are using a different version of swift you can use a `.swift-version` file to set the version for your Pod. For example to use Swift 2.3, run: 

    `echo "2.3" > .swift-version`.

 

遇到上面的這種情況,直接使用下面的這條命令就可以解決問題了。
echo 3.0 > .swift-version
//下面這種方法只適合於pod沒有更新的情況下.
sudo gem install -n /usr/local/bin cocoapods

又出現新的錯誤

opening connection to trunk.cocoapods.org:443...

[!] There was an error pushing a new version to trunk: getaddrinfo: nodename nor servname provided, or not known

 我的做法是重新提交了版本號,但是感覺如果不重新提交也應該沒有問題的。

git tag 1.0.2 git push --tag

提到了需要進行更新:

pod repo update --verbose 

[!] CocoaPods was not able to update the `master` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`

 依次做完后,報上面的錯誤。

我的做法是重啟了電腦,重新將代碼提交一次,再次進行。最后成功了,但是這不能說明什么,只是我個人的情況。放在是希望對跟我遇到類似問題的人一些幫助。

pod trunk push --verbose

搜索可以看到:

-> XLJNewFeature (1.0.2)
   一行代碼實現新特性功能
   pod 'XLJNewFeature', '~> 1.0.2'
   - Homepage: https://github.com/marlonxlj/newFeaturesx
   - Source:   https://github.com/marlonxlj/newFeaturesx.git
   - Versions: 1.0.2, 1.0.1, 1.0.0 [master repo]
(END)

 

Email:marlonxlj@163.com

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM