[!] sckit did not pass validation, due to 3 warnings (but you can use `--allow-warnings` to ignore them). [!] 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`. You can use the `--no-clean` option to inspect any issue.
解决方案:pod lib lint --allow-warnings
cocopod慢
pod update --verbose --no-repo-update ```
3. ```Unable to find a specification for `sckit (= 1.0.2)` ```的解决方法,添加源
![image.png](http://upload-images.jianshu.io/upload_images/534848-e4f31a156e95a5c6.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
3. ```pod search 时出现[!] Unable to find a pod with name, author, summary, or description matching ```
解决方案 `rm ~/Library/Caches/CocoaPods/search_index.json`
4. ``` [!] An unexpected version directory Assets was encountered for the /Users/xuzhengrong/.cocoapods/repos/coding-swagon-sckit/sckit Pod in the sckit repository. ``` **[巨坑]使用仓库的地址,不是插件的地址,超级坑的地方**
4. ```error: Your local changes to the following files would be overwritten by merge:Please, commit your changes or stash them before you can merge.```解决方案
```git stash
git pull
git stash pop```
6. Spec文件块
Pod::Spec.new do |s|
s.name = "sckit" #名称
s.version = "1.0.4" #版本号
s.summary = "Just Testing." #简短介绍,下面是详细介绍
s.description = <<-DESC
Testing Private Podspec.
s.homepage = "https://coding.net/u/swagon/p/11" #主页,这里要填写可以访问到的地址,不然验证不通过
s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2" #截图
s.license = 'MIT' #开源协议
s.author = { "wtlucky" => "wtlucky@foxmail.com" } #作者信息
s.source = { :git => "https://git.coding.net/swagon/sckit.git", :tag => "1.0.4" } #项目地址,这里不支持ssh的地址,验证不通过,只支持HTTP和HTTPS,最好使用HTTPS
s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>' #多媒体介绍地址
s.platform = :ios, '7.0' #支持的平台及版本
s.requires_arc = true #是否使用ARC,如果指定具体文件,则具体的问题使用ARC
s.source_files = 'sckit/Classes//' #代码源文件地址,/表示Classes目录及其子目录下所有文件,如果有多个目录下则用逗号分开,如果需要在项目中分组显示,这里也要做相应的设置
s.resource_bundles = {
'sckit' => ['sckit/Assets/*.png']
} #资源文件地址
s.public_header_files = 'sckit/Classes/*/.h' #公开头文件地址
s.frameworks = 'UIKit' #所需的framework,多个用逗号隔开
s.dependency 'AFNetworking', '~> 2.3' #依赖关系,该项目所依赖的其他库,如果有多个需要填写多个s.dependency
end
7.
1. `pod spec create sckit [address].git`
2. `pod lib lint`
3. `pod repo push sckit sckit.podspec`
8. source 'https://github.com/CocoaPods/Specs.git' #官方仓库地址
source ‘https://git.coding.net/swagon/sckit.git’