美文网首页iOS程序猿
用pods管理组件(本地私有库)

用pods管理组件(本地私有库)

作者: 377f66eb43c9 | 来源:发表于2017-06-15 11:46 被阅读31次

    本地私有库

    1. 对组件进行git管理

    git init
    git add .
    git commit -m '描述信息'
    

    2. 添加podspec文件

    pod lib create AWYBase //AWYBase和组件名保持一致
    

    添加之后打开podspec文件,把s.source中的git=>置为空。
    然后在finder中打开AWYBase(你创建的组件名)找到里边的classes,把你写的组件源码复制到这里,替代replace。

    注意:然后重复第一步!

    3. 在宿主工程中使用这个本地私有库

    pod init
    //然后打开podfile
    pod 'AWYBase', :path=>'(路径必须保证能找到podspec文件,也就是podspec文件所在的文件夹)'
    

    相关文章

      网友评论

        本文标题:用pods管理组件(本地私有库)

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