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

 

posted @ 2016-11-14 17:27  marlonxlj  阅读(4647)  评论(0编辑  收藏  举报