美文网首页
create a custom pod lib

create a custom pod lib

作者: NieFeng1024 | 来源:发表于2018-06-03 12:28 被阅读15次
    1. create a lib on github
    2. add git tag
    cd /Users/Yan/UIButtonUnit/
    git tag '0.0.1'
    git push --tags
    username
    password
    3. pod spec create UIButtonUnit.podspec
    
    
    - ERROR | [iOS] unknown: Encountered an unknown error (/usr/bin/xcrun simctl list -j devices
    
    xcrun: error: unable to find utility "simctl", not a developer tool or in PATH
    ) during validation.
    
    [!] UIButtonUnit did not pass validation, due to 1 error.
    You can use the `--no-clean` option to inspect any issue.
    

    解决方案-设置Xcode CommandlineTools

    pod trunk push xxxxxx.podspec --allow-warnings --use-libraries
    验证成功之后进行push 操作验证失败。
    ###[iOS] file patterns: The `source_files` pattern did not match any file.
    检查路径是否正确
      s.source_files = 'UIButtonUnit/Classes/*.{h,m}'
    如果确认真确
    切换到clone git 的文件夹 默认在/User/XXX<用户名>/xxx<项目名>
    git tag 0.0.1
    git push --tags
    再进行 push 
    sccess
    
    source_files.png

    [iOS] file patterns: The source_files pattern did not match any file.解决方案

    切换回pod lib create XXX 的文件夹(.podspec文件的上级目录)重新push
    cd /User/XXX/Desktop/xxx
    
    pod trunk push xxxxxx.podspec --allow-warnings --use-libraries
    
    Yan$ pod search UIButtonUnit
    
    [!] Unable to find a pod with name, author, summary, or description matching `UIButtonUnit`
    报错搜索失败,移除缓存重新search
    localhost:UIButtonUnit Yan$ rm ~/Library/Caches/CocoaPods/search_index.json
    
    localhost:UIButtonUnit Yan$ pod search UIButtonUnit
    
    -> UIButtonUnit (0.0.2)
       A UIButtonUnit is a category for UIButton
       pod 'UIButtonUnit', '~> 0.0.2'
       - Homepage: https://github.com/550872569/UIButtonUnit
       - Source:   https://github.com/550872569/UIButtonUnit.git
       - Versions: 0.0.2 [master repo]
    (END)
    
    wq 退出search
    

    相关文章

      网友评论

          本文标题:create a custom pod lib

          本文链接:https://www.haomeiwen.com/subject/zijlsftx.html