美文网首页
cocoapods私有库创建

cocoapods私有库创建

作者: 牛1688 | 来源:发表于2020-01-17 20:14 被阅读0次

    cocoapods私有库创建

    终端里操作 cd 到 你指定目录

    1 pod lib create"XXXX   "XXXX" 是库的名称,  然后按 cocoapod 模板操作

    输入后会提示正在下载模板,并添加到指定的位置。

    Cloning `https://github.com/CocoaPods/pod-template.git` into `CFALibrary`.

    模板下载好以后,需要你回答几个问题:

    1.你要使用哪种语言?

    2.库中是否包含一个实例程序?(个人觉得有个示例程序会好点)

    3.你要使用哪个测试框架?(没有的话老老实实写None)

    4.是否要UI测试?(我一直都是NO,没有测试过)

    5.类名前缀是什么?

    Configuring CFALibrary template.

    ------------------------------

    To get you started we need to ask a few questions, this should only take a minute.

    If this is your first time we recommend running through with the guide:

    - http://guides.cocoapods.org/making/using-pod-lib-create.html

    ( hold cmd and click links to open in a browser. )

    What language do you want to use?? [ Swift / ObjC ]

    > ObjC

    Would you like to include a demo application with your library? [ Yes / No ]

    > Yes

    Which testing frameworks will you use? [ Specta / Kiwi / None ]

    > None

    Would you like to do view based testing? [ Yes / No ]

    > No

    What is your class prefix?

    > CFA

    Running pod install on your new library.

    问答完后,就会自动执行pod install。

    2  找到 classes 删除文件侠内容

    3 添加 准备制做 pod 的文件

    4 新建一个仓库,用于关联这个 demo

    git remote add origin 仓库远程地址

    git push -u origin master

    5 验证检查本地

    pod lib lint --allow-warnings

    6 Create tag

    //create local tag

    git tag'0.0.1'或git tag0.0.1

    //local tag push to remote

    git push--tags或git push origin0.0.1

    //delete local tag

    git tag-d0.0.1

    //delete remote tag

    git tag origin:0.0.1

    7 进行验证检查远程

    pod spec lint --allow-warnings

    相关文章

      网友评论

          本文标题:cocoapods私有库创建

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