https://github.com/potato512/CocoapodSpecDemo/tree/master/Help
20191226
1、pod search xxx 报错,错误信息如下:
pod search SYLogManager
Creating search index for spec repo 'cocoapods'.. Done!
[!] CDN: trunk Repo update failed - 3 error(s):
CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/6/1/0/CrashLogManager/0.1.0/CrashLogManager.podspec.json, error: Failed to open TCP connection to raw.githubusercontent.com:443 (Connection refused - connect(2) for "raw.githubusercontent.com" port 443)
CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/6/1/0/CrashLogManager/0.1.1/CrashLogManager.podspec.json, error: Failed to open TCP connection to raw.githubusercontent.com:443 (Connection refused - connect(2) for "raw.githubusercontent.com" port 443)
CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/6/1/0/CrashLogManager/0.1.2/CrashLogManager.podspec.json, error: Failed to open TCP connection to raw.githubusercontent.com:443 (Connection refused - connect(2) for "raw.githubusercontent.com" port 443)
解决:移除操作 pod repo remove trunk —— 搜索操作 pod search
20190101
1、file patterns: The `source_files` pattern did not match any file.
解决:检查你.podspec文件中s.source_files路径有没有填错。
源文件所在目录名称与xx.podspec文件保持同名,且在同一个层级。
2、file patterns: The `public_header_files` pattern did not match any file.
解决:检查你.podspec文件中public_header_files路径有没有填错
源文件所在目录名称与xx.podspec文件保持同名,且在同一个层级。
3、[!] You need to register a session first.
解决:第一次使用时需要注册
(1)注册命令:
pod trunk register [email protected] 'yourname' --description='iMac' --verbose
(2)查看邮箱验证
(3)查看命令:
pod trunk me
4、[!] 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
5、[!] Unable to find a pod with name, author, summary, or description matching `CocoapodSpecDemo`
解决:
(1)删除缓存:
rm ~/Library/Caches/CocoaPods/search_index.json
(2)再重输入搜索:
pod search xxxx
6、初次创建私有库时,如果没有创建LICENSE文件,则会造成执行"pod trunk push xxxx"命令时出错。
解决:在github的项目中,后续创建LICENSE文件。
创建方法:进入github项目-选择<>code-Create new file-Name your file(LICENSE)-choose a license(MIT license)-Commit new file
7、使用pod lib lint ,或pod spec lint 进行校验文件时报错
- ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
- ERROR | xcodebuild: /Users/zhangshaoyu/Library/Developer/Xcode/DerivedData/App-cojazwchykrvonefhcdkwuhxckoo/Build/Products/Release-iphonesimulator/SYImageBrowser/SYImageBrowser.framework/Headers/SYImageBrowseHelper.h:17:9: error: include of non-modular header inside framework module 'SYImageBrowser.SYImageBrowseHelper' [-Werror,-Wnon-modular-include-in-framework-module]
解决:自建的私有库项目中有第三方依赖库,且在.h文件中做了#import引入,改成在.m文件中#import引用即可。