github中创建自己的cocoapod私有库_异常问题解决

来源:互联网 发布:centos 文件夹扩容 编辑:程序博客网 时间:2024/06/05 03:04

https://github.com/potato512/CocoapodSpecDemo/tree/master/Help


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 xxx@xxx.com '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引用即可。





原创粉丝点击