iOS--CocoaPods详解

<div id="article_content" class="article_content">


<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px; text-align:center">
<span style="color:rgb(0,153,0)"><span style="font-size:18px">CocoaPods详解之----制作篇</span></span><span style="font-size:18px; color:rgb(0,153,0)"><strong></strong></span></div>
<span style="color:rgb(51,51,51); font-family:Arial; line-height:26px; font-size:18px"></span><span style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"></span><span style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"></span><span style="color:rgb(51,51,51); font-family:Arial; line-height:26px; font-size:14.4px"></span><span style="color:rgb(51,51,51); font-family:Arial; line-height:26px; font-size:14.4px"></span><span style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"></span><span style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"></span><span style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"></span>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="color:rgb(255,0,0)">原文地址:</span><span style="color:rgb(51,102,153)"><a target="_blank" href="http://blog.csdn.net/wzzvictory/article/details/20067595" style="color:rgb(51,102,153); text-decoration:none">http://blog.csdn.net/wzzvictory/article/details/20067595</a></span></div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px">学会使用别人的Pods依赖库以后,你一定对创建自己的依赖库跃跃欲试,今天就来揭开Pods依赖库创建过程的神秘面纱。整个创建过程都以我实现的一个名称为WZMarqueeView跑马灯效果的view为例,步骤如下:</span></span></div>
<h2 style="margin:0px; padding:0px; color:rgb(51,51,51); font-family:Arial; line-height:26px; font-size:14px"><a name="t0"></a>
<a target="_blank" name="t0" style="color:rgb(51,102,153)"></a><span style="font-size:18px"><span style="font-size:14px">一、创建自己的github仓库</span></span></h2>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px">CocoaPods都托管在github上(官方链接为:<a target="_blank" href="https://github.com/CocoaPods" style="color:rgb(51,102,153); text-decoration:none">https://github.com/CocoaPods</a>),所有的Pods依赖库也都依赖github,因此第一步我们需要创建一个属于自己的github仓库。仓库创建界面如下图:</span></span></div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px"><img src="https://img-blog.csdn.net/20140304101538437?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvd3p6dmljdG9yeQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="" style="border:none; max-width:100%"><br>
</span></span></div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
上图中标了序号的共6处,对应的说明如下:</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
1、Repository name</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
仓库名称,这里写成WZMarqueeView,必填的;</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
2、Description</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
仓库的描述信息,可选的;</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
3、仓库的公开性</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
这里只能选Public,一个是因为Private是要money的,再一个Private别人看不到还共享个毛;</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
4、是否创建一个默认的README文件</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
一个完整地仓库,都需要README说明文档,建议选上。当然不嫌麻烦的话你也可以后面再手动创建一个;</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
5、是否添加.gitignore文件</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
.gitignore文件里面记录了若干中文件类型,凡是该文件包含的文件类型,git都不会将其纳入到版本管理中。是否选择看个人需要;</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
6、license类型</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
正规的仓库都应该有一个license文件,Pods依赖库对这个文件的要求更严,是必须要有的。因此最好在这里让github创建一个,也可以自己后续再创建。我使用的license类型是MIT。</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<br>
</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
上面的各项都填写完毕后,点击Create repository按钮即可,创建成功地界面如图:</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<img src="https://img-blog.csdn.net/20140304103428187?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvd3p6dmljdG9yeQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="" style="border:none; max-width:100%"><br>
</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
到这,仓库创建过程就结束了。</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<br>
</div>
<h2 style="margin:0px; padding:0px; color:rgb(51,51,51); font-family:Arial; line-height:26px; font-size:14px"><a name="t1"></a>
<a target="_blank" name="t1" style="color:rgb(51,102,153)"></a>二、clone仓库到本地</h2>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
为了便于向仓库中删减内容,需要先将仓库clone到本地,操作方式有多种,推荐使用命令行:
<div class="dp-highlighter bg_objc" style="font-family:Consolas,'Courier New',Courier,mono,serif; font-size:12px; width:700.906px; overflow:auto; padding-top:1px; margin:18px 0px!important; background-color:rgb(231,229,220)">
<div class="bar" style="padding-left:45px">
<div class="tools" style="padding:3px 8px 10px 10px; font-size:9px; line-height:normal; font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; color:silver; border-left-width:3px; border-left-style:solid; border-left-color:rgb(108,226,108); background-color:rgb(248,248,248)">
<strong>[objc]</strong>&nbsp;<a target="_blank" href="http://blog.csdn.net/wzzvictory/article/details/20067595#" class="ViewSource" title="view plain" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; text-indent:-2000px; background-color:inherit">view
 plain</a><a target="_blank" href="http://blog.csdn.net/wzzvictory/article/details/20067595#" class="CopyToClipboard" title="copy" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; text-indent:-2000px; background-color:inherit">copy</a><a target="_blank" href="https://code.csdn.net/snippets/216827" title="在CODE上查看代码片" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; background-color:inherit"><img src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" alt="在CODE上查看代码片" style="border:none; max-width:100%; position:relative; top:1px; left:2px"></a><a target="_blank" href="https://code.csdn.net/snippets/216827/fork" title="派生到我的代码片" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; background-color:inherit"><img src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" alt="派生到我的代码片" style="border:none; max-width:100%; position:relative; top:2px; left:2px"></a>
<div style="position:absolute; left:519px; top:2301px; width:18px; height:18px; z-index:99">
</div>
<div style="position: absolute; left: 392px; top: 2322px; width: 18px; height: 18px; z-index: 99;"><embed id="ZeroClipboardMovie_1" src="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="18" height="18" name="ZeroClipboardMovie_1" align="middle" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=1&amp;width=18&amp;height=18" wmode="transparent"></div></div>
</div>
<ol start="1" class="dp-objc" style="padding:0px; border:none; color:rgb(92,92,92); margin:0px 0px 1px 45px!important; background-color:rgb(255,255,255)">
<li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"><span style="margin:0px; padding:0px; border:none; background-color:inherit">$&nbsp;git&nbsp;clone</span><span class="vars" style="margin:0px; padding:0px; border:none; color:rgb(221,0,0); background-color:inherit">&nbsp;https</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">:</span><span class="comment" style="margin:0px; padding:0px; border:none; color:rgb(0,130,0); background-color:inherit">//github.com/wangzz/WZMarqueeView.git</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;&nbsp;</span></span></li></ol>
<div class="save_code tracking-ad" data-mod="popu_249"><a href="javascript:;" target="_blank"><img src="http://static.blog.csdn.net/images/save_snippets.png"></a></div></div>
</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
操作完成后,github上对应的文件都会拷贝到本地,目录结构为:</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<img src="https://img-blog.csdn.net/20140304110718828?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvd3p6dmljdG9yeQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="" style="border:none; max-width:100%"><br>
</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
github上仓库中的.gitignore文件是以.开头的隐藏文件,因此这里只能看到两个。</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
后续我们的所有文件增、删、改都在这个目录下进行。</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<br>
</div>
<h2 style="margin:0px; padding:0px; color:rgb(51,51,51); font-family:Arial; line-height:26px; font-size:14px"><a name="t2"></a>
<a target="_blank" name="t2" style="color:rgb(51,102,153)"></a>三、向本地git仓库中添加创建Pods依赖库所需文件</h2>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
注意:<span style="color:rgb(255,0,0)">以下描述的文件都要放在步骤二clone到本地的git仓库的根目录下面。</span></div>
<h3 style="margin:0px; padding:0px; color:rgb(51,51,51); font-family:Arial; line-height:26px; font-size:14px"><a name="t3"></a>
<a target="_blank" name="t3" style="color:rgb(51,102,153)"></a>1、后缀为.podspec文件</h3>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
该文件为Pods依赖库的描述文件,每个Pods依赖库必须有且仅有那么一个描述文件。文件名称要和我们想创建的依赖库名称保持一致,我的WZMarqueeView依赖库对应的文件名为WZMarqueeView.podspec。</div>
<p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
1.1 podspec文件内容</p>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
WZMarqueeView.podspec的保存内容为:<br>
<div class="dp-highlighter bg_ruby" style="font-family:Consolas,'Courier New',Courier,mono,serif; font-size:12px; width:700.906px; overflow:auto; padding-top:1px; margin:18px 0px!important; background-color:rgb(231,229,220)">
<div class="bar" style="padding-left:45px">
<div class="tools" style="padding:3px 8px 10px 10px; font-size:9px; line-height:normal; font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; color:silver; border-left-width:3px; border-left-style:solid; border-left-color:rgb(108,226,108); background-color:rgb(248,248,248)">
<strong>[ruby]</strong>&nbsp;<a target="_blank" href="http://blog.csdn.net/wzzvictory/article/details/20067595#" class="ViewSource" title="view plain" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; text-indent:-2000px; background-color:inherit">view
 plain</a><a target="_blank" href="http://blog.csdn.net/wzzvictory/article/details/20067595#" class="CopyToClipboard" title="copy" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; text-indent:-2000px; background-color:inherit">copy</a><a target="_blank" href="https://code.csdn.net/snippets/216827" title="在CODE上查看代码片" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; background-color:inherit"><img src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" alt="在CODE上查看代码片" style="border:none; max-width:100%; position:relative; top:1px; left:2px"></a><a target="_blank" href="https://code.csdn.net/snippets/216827/fork" title="派生到我的代码片" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; background-color:inherit"><img src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" alt="派生到我的代码片" style="border:none; max-width:100%; position:relative; top:2px; left:2px"></a>
<div style="position:absolute; left:521px; top:2921px; width:18px; height:18px; z-index:99">
</div>
<div style="position: absolute; left: 394px; top: 2917px; width: 18px; height: 18px; z-index: 99;"><embed id="ZeroClipboardMovie_2" src="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="18" height="18" name="ZeroClipboardMovie_2" align="middle" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=2&amp;width=18&amp;height=18" wmode="transparent"></div></div>
</div>
<ol start="1" class="dp-rb" style="padding:0px; border:none; color:rgb(92,92,92); margin:0px 0px 1px 45px!important; background-color:rgb(255,255,255)">
<li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"><span style="margin:0px; padding:0px; border:none; background-color:inherit">Pod::Spec.</span><span class="keyword" style="margin:0px; padding:0px; border:none; color:rgb(0,102,153); font-weight:bold; background-color:inherit">new</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;</span><span class="keyword" style="margin:0px; padding:0px; border:none; color:rgb(0,102,153); font-weight:bold; background-color:inherit">do</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;|s|&nbsp;&nbsp;</span></span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;s.name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="string" style="margin:0px; padding:0px; border:none; color:blue; background-color:inherit">"WZMarqueeView"</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;&nbsp;</span></span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;s.version&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="string" style="margin:0px; padding:0px; border:none; color:blue; background-color:inherit">"1.0.0"</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;&nbsp;</span></span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;s.summary&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="string" style="margin:0px; padding:0px; border:none; color:blue; background-color:inherit">"A&nbsp;marquee&nbsp;view&nbsp;used&nbsp;on&nbsp;iOS."</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;&nbsp;</span></span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;s.description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;&lt;&lt;-DESC&nbsp;&nbsp;</span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;It&nbsp;is&nbsp;a&nbsp;marquee&nbsp;view&nbsp;used&nbsp;on&nbsp;iOS,&nbsp;which&nbsp;implement&nbsp;by&nbsp;Objective-C.&nbsp;&nbsp;</span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DESC&nbsp;&nbsp;</span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;s.homepage&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="string" style="margin:0px; padding:0px; border:none; color:blue; background-color:inherit">"https://github.com/wangzz/WZMarqueeView"</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;&nbsp;</span></span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;<span class="comment" style="margin:0px; padding:0px; border:none; color:rgb(0,130,0); background-color:inherit">#&nbsp;s.screenshots&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;"www.example.com/screenshots_1",&nbsp;"www.example.com/screenshots_2"</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;&nbsp;</span></span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;s.license&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="string" style="margin:0px; padding:0px; border:none; color:blue; background-color:inherit">'MIT'</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;&nbsp;</span></span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;s.author&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;{&nbsp;<span class="string" style="margin:0px; padding:0px; border:none; color:blue; background-color:inherit">"王中周"</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;=&gt;&nbsp;</span><span class="string" style="margin:0px; padding:0px; border:none; color:blue; background-color:inherit">"wzzvictory_tjsd@163.com"</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;}&nbsp;&nbsp;</span></span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;s.source&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;{&nbsp;<span class="symbol" style="margin:0px; padding:0px; border:none; color:rgb(170,119,0); background-color:inherit">:git</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;=&gt;&nbsp;</span><span class="string" style="margin:0px; padding:0px; border:none; color:blue; background-color:inherit">"https://github.com/wangzz/WZMarqueeView.git"</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">,&nbsp;</span><span class="symbol" style="margin:0px; padding:0px; border:none; color:rgb(170,119,0); background-color:inherit">:tag</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;=&gt;&nbsp;s.version.to_s&nbsp;}&nbsp;&nbsp;</span></span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;<span class="comment" style="margin:0px; padding:0px; border:none; color:rgb(0,130,0); background-color:inherit">#&nbsp;s.social_media_url&nbsp;=&nbsp;'https://twitter.com/NAME'</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;&nbsp;</span></span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;</span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;s.platform&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="symbol" style="margin:0px; padding:0px; border:none; color:rgb(170,119,0); background-color:inherit">:ios</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">,&nbsp;</span><span class="string" style="margin:0px; padding:0px; border:none; color:blue; background-color:inherit">'4.3'</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;&nbsp;</span></span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;<span class="comment" style="margin:0px; padding:0px; border:none; color:rgb(0,130,0); background-color:inherit">#&nbsp;s.ios.deployment_target&nbsp;=&nbsp;'5.0'</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;&nbsp;</span></span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;<span class="comment" style="margin:0px; padding:0px; border:none; color:rgb(0,130,0); background-color:inherit">#&nbsp;s.osx.deployment_target&nbsp;=&nbsp;'10.7'</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;&nbsp;</span></span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;s.requires_arc&nbsp;=&nbsp;<span class="keyword" style="margin:0px; padding:0px; border:none; color:rgb(0,102,153); font-weight:bold; background-color:inherit">true</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;&nbsp;</span></span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;</span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;s.source_files&nbsp;=&nbsp;<span class="string" style="margin:0px; padding:0px; border:none; color:blue; background-color:inherit">'WZMarqueeView/*'</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;&nbsp;</span></span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;<span class="comment" style="margin:0px; padding:0px; border:none; color:rgb(0,130,0); background-color:inherit">#&nbsp;s.resources&nbsp;=&nbsp;'Assets'</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;&nbsp;</span></span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;</span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;<span class="comment" style="margin:0px; padding:0px; border:none; color:rgb(0,130,0); background-color:inherit">#&nbsp;s.ios.exclude_files&nbsp;=&nbsp;'Classes/osx'</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;&nbsp;</span></span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;<span class="comment" style="margin:0px; padding:0px; border:none; color:rgb(0,130,0); background-color:inherit">#&nbsp;s.osx.exclude_files&nbsp;=&nbsp;'Classes/ios'</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;&nbsp;</span></span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;<span class="comment" style="margin:0px; padding:0px; border:none; color:rgb(0,130,0); background-color:inherit">#&nbsp;s.public_header_files&nbsp;=&nbsp;'Classes/**/*.h'</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;&nbsp;</span></span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;s.frameworks&nbsp;=&nbsp;<span class="string" style="margin:0px; padding:0px; border:none; color:blue; background-color:inherit">'Foundation'</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">,&nbsp;</span><span class="string" style="margin:0px; padding:0px; border:none; color:blue; background-color:inherit">'CoreGraphics'</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">,&nbsp;</span><span class="string" style="margin:0px; padding:0px; border:none; color:blue; background-color:inherit">'UIKit'</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;&nbsp;</span></span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;</span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"><span class="keyword" style="margin:0px; padding:0px; border:none; color:rgb(0,102,153); font-weight:bold; background-color:inherit">end</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;&nbsp;</span></span></li></ol>
<div class="save_code tracking-ad" data-mod="popu_249"><a href="javascript:;" target="_blank"><img src="http://static.blog.csdn.net/images/save_snippets.png"></a></div></div>
该文件是ruby文件,里面的条目都很容易知道含义。</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
其中需要说明的又几个参数:</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
①s.license</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
Pods依赖库使用的license类型,大家填上自己对应的选择即可。</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
②s.source_files</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
表示源文件的路径,<span style="color:rgb(255,0,0)">注意这个路径是相对podspec文件而言的。</span></div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
③s.frameworks</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
需要用到的frameworks,<span style="color:rgb(255,0,0)">不需要加.frameworks后缀。</span></div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<br>
</div>
<p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
1.2 如何创建podspec文件</p>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
大家创建自己的podspec文件可以有两个途径:</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
①copy我的podspec文件然后修改对应的参数,推荐使用这种方式。</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
②执行以下创建命令:
<div class="dp-highlighter bg_ruby" style="font-family:Consolas,'Courier New',Courier,mono,serif; font-size:12px; width:700.906px; overflow:auto; padding-top:1px; margin:18px 0px!important; background-color:rgb(231,229,220)">
<div class="bar" style="padding-left:45px">
<div class="tools" style="padding:3px 8px 10px 10px; font-size:9px; line-height:normal; font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; color:silver; border-left-width:3px; border-left-style:solid; border-left-color:rgb(108,226,108); background-color:rgb(248,248,248)">
<strong>[ruby]</strong>&nbsp;<a target="_blank" href="http://blog.csdn.net/wzzvictory/article/details/20067595#" class="ViewSource" title="view plain" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; text-indent:-2000px; background-color:inherit">view
 plain</a><a target="_blank" href="http://blog.csdn.net/wzzvictory/article/details/20067595#" class="CopyToClipboard" title="copy" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; text-indent:-2000px; background-color:inherit">copy</a><a target="_blank" href="https://code.csdn.net/snippets/216827" title="在CODE上查看代码片" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; background-color:inherit"><img src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" alt="在CODE上查看代码片" style="border:none; max-width:100%; position:relative; top:1px; left:2px"></a><a target="_blank" href="https://code.csdn.net/snippets/216827/fork" title="派生到我的代码片" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; background-color:inherit"><img src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" alt="派生到我的代码片" style="border:none; max-width:100%; position:relative; top:2px; left:2px"></a>
<div style="position:absolute; left:521px; top:3878px; width:18px; height:18px; z-index:99">
</div>
<div style="position: absolute; left: 394px; top: 3849px; width: 18px; height: 18px; z-index: 99;"><embed id="ZeroClipboardMovie_3" src="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="18" height="18" name="ZeroClipboardMovie_3" align="middle" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=3&amp;width=18&amp;height=18" wmode="transparent"></div></div>
</div>
<ol start="1" class="dp-rb" style="padding:0px; border:none; color:rgb(92,92,92); margin:0px 0px 1px 45px!important; background-color:rgb(255,255,255)">
<li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"><span style="margin:0px; padding:0px; border:none; background-color:inherit">$&nbsp;pod&nbsp;spec&nbsp;create&nbsp;WZMarqueeView&nbsp;&nbsp;</span></span></li></ol>
<div class="save_code tracking-ad" data-mod="popu_249"><a href="javascript:;" target="_blank"><img src="http://static.blog.csdn.net/images/save_snippets.png"></a></div></div>
也会创建名为WZMarqueeView.podspec的文件。但是打开创建完的文件你就会发现里面的东西太多了,很多都是我们不需要的。</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<br>
</div>
<h3 style="margin:0px; padding:0px; color:rgb(51,51,51); font-family:Arial; line-height:26px; font-size:14px"><a name="t4"></a>
<a target="_blank" name="t4" style="color:rgb(51,102,153)"></a>2、LICENSE文件</h3>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
CocoaPods强制要求所有的Pods依赖库都必须有license文件,否则验证不会通过。license的类型有很多种,详情可以参考网站<a target="_blank" href="https://tldrlegal.com/" style="color:rgb(255,0,0); text-decoration:none">tl;dr Legal</a>。在创建github仓库的时候,我已经选择了MIT类型的license。</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<br>
</div>
<h3 style="margin:0px; padding:0px; color:rgb(51,51,51); font-family:Arial; line-height:26px; font-size:14px"><a name="t5"></a>
<a target="_blank" name="t5" style="color:rgb(51,102,153)"></a>3、主类文件</h3>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
创建Pods依赖库就是为了方便别人使用我们的成果,比如我想共享给大家的WZMarqueeView类,是我想提供给广大用户使用的,这个类自然是必不可少的。我把这个类包含的两个文件放到一个名称为WZMarqueeView的文件夹中,对应的目录结构如图:</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<img src="https://img-blog.csdn.net/20140304094406921?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvd3p6dmljdG9yeQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="" style="border:none; max-width:100%"><br>
</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px">里面包含两个文件:WZMarqueeView.h和WZMarqueeView.m</span></span></div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px"><br>
</span></span></div>
<h3 style="margin:0px; padding:0px; color:rgb(51,51,51); font-family:Arial; line-height:26px; font-size:14px"><a name="t6"></a>
<a target="_blank" name="t6" style="color:rgb(51,102,153)"></a><span style="font-size:18px"><span style="font-size:14px">4、demo工程</span></span></h3>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
为了快速地教会别人使用我们的Pods依赖库,通常需要提供一个demo工程。我创建的demo工程放到了一个名为WZMarqueeViewDemo的文件夹中,该目录包含的文件如下图所示:</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<img src="https://img-blog.csdn.net/20140304095547765?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvd3p6dmljdG9yeQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="" style="border:none; max-width:100%"><br>
</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<br>
</div>
<h3 style="margin:0px; padding:0px; color:rgb(51,51,51); font-family:Arial; line-height:26px; font-size:14px"><a name="t7"></a>
<a target="_blank" name="t7" style="color:rgb(51,102,153)"></a>5、README.md</h3>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
使用github的人应该都熟悉这个文件,它是一个成功github仓库必不可少的一部分,使用的是markdown标记语言,用于对仓库的详细说明。</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<br>
</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
以上所说的5个是创建Pods依赖库所需最基础的文件,<span style="color:rgb(255,0,0)">其中1、2、3是必需的,4、5是可选但强烈推荐创建的。</span></div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px">添加完这些文件以后,我的github本地仓库目录就变成了下图所示的样子:</span></span></div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px"><img src="https://img-blog.csdn.net/20140304120124578?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvd3p6dmljdG9yeQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="" style="border:none; max-width:100%"><br>
</span></span></div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px"><br>
</span></span></div>
<h2 style="margin:0px; padding:0px; color:rgb(51,51,51); font-family:Arial; line-height:26px; font-size:14px"><a name="t8"></a>
<a target="_blank" name="t8" style="color:rgb(51,102,153)"></a><span style="font-size:18px"><span style="font-size:14px">四、提交修改文件到github</span></span></h2>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px">经过步骤三,向本地的git仓库中添加了不少文件,现在需要将它们提交到github仓库中去。提交过程分以下几步:</span></span></div>
<h3 style="margin:0px; padding:0px; color:rgb(51,51,51); font-family:Arial; line-height:26px; font-size:14px"><a name="t9"></a>
<a target="_blank" name="t9" style="color:rgb(51,102,153)"></a><span style="font-size:18px"><span style="font-size:14px">1、pod验证</span></span></h3>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px">执行以下命令:</span></span>
<div class="dp-highlighter bg_ruby" style="font-family:Consolas,'Courier New',Courier,mono,serif; font-size:12px; width:700.906px; overflow:auto; padding-top:1px; margin:18px 0px!important; background-color:rgb(231,229,220)">
<div class="bar" style="padding-left:45px">
<div class="tools" style="padding:3px 8px 10px 10px; font-size:9px; line-height:normal; font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; color:silver; border-left-width:3px; border-left-style:solid; border-left-color:rgb(108,226,108); background-color:rgb(248,248,248)">
<strong>[ruby]</strong>&nbsp;<a target="_blank" href="http://blog.csdn.net/wzzvictory/article/details/20067595#" class="ViewSource" title="view plain" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; text-indent:-2000px; background-color:inherit">view
 plain</a><a target="_blank" href="http://blog.csdn.net/wzzvictory/article/details/20067595#" class="CopyToClipboard" title="copy" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; text-indent:-2000px; background-color:inherit">copy</a><a target="_blank" href="https://code.csdn.net/snippets/216827" title="在CODE上查看代码片" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; background-color:inherit"><img src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" alt="在CODE上查看代码片" style="border:none; max-width:100%; position:relative; top:1px; left:2px"></a><a target="_blank" href="https://code.csdn.net/snippets/216827/fork" title="派生到我的代码片" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; background-color:inherit"><img src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" alt="派生到我的代码片" style="border:none; max-width:100%; position:relative; top:2px; left:2px"></a>
<div style="position:absolute; left:521px; top:5455px; width:18px; height:18px; z-index:99">
</div>
<div style="position: absolute; left: 394px; top: 5351px; width: 18px; height: 18px; z-index: 99;"><embed id="ZeroClipboardMovie_4" src="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="18" height="18" name="ZeroClipboardMovie_4" align="middle" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=4&amp;width=18&amp;height=18" wmode="transparent"></div></div>
</div>
<ol start="1" class="dp-rb" style="padding:0px; border:none; color:rgb(92,92,92); margin:0px 0px 1px 45px!important; background-color:rgb(255,255,255)">
<li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"><span style="margin:0px; padding:0px; border:none; background-color:inherit">$&nbsp;set&nbsp;the&nbsp;</span><span class="keyword" style="margin:0px; padding:0px; border:none; color:rgb(0,102,153); font-weight:bold; background-color:inherit">new</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;version&nbsp;to&nbsp;1.0.0&nbsp;&nbsp;</span></span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">$&nbsp;set&nbsp;the&nbsp;<span class="keyword" style="margin:0px; padding:0px; border:none; color:rgb(0,102,153); font-weight:bold; background-color:inherit">new</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;tag&nbsp;to&nbsp;1.0.0&nbsp;&nbsp;</span></span></li></ol>
<div class="save_code tracking-ad" data-mod="popu_249"><a href="javascript:;" target="_blank"><img src="http://static.blog.csdn.net/images/save_snippets.png"></a></div></div>
这两条命令是为pod添加版本号并打上tag。然后执行pod验证命令:
<div class="dp-highlighter bg_ruby" style="font-family:Consolas,'Courier New',Courier,mono,serif; font-size:12px; width:700.906px; overflow:auto; padding-top:1px; margin:18px 0px!important; background-color:rgb(231,229,220)">
<div class="bar" style="padding-left:45px">
<div class="tools" style="padding:3px 8px 10px 10px; font-size:9px; line-height:normal; font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; color:silver; border-left-width:3px; border-left-style:solid; border-left-color:rgb(108,226,108); background-color:rgb(248,248,248)">
<strong>[ruby]</strong>&nbsp;<a target="_blank" href="http://blog.csdn.net/wzzvictory/article/details/20067595#" class="ViewSource" title="view plain" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; text-indent:-2000px; background-color:inherit">view
 plain</a><a target="_blank" href="http://blog.csdn.net/wzzvictory/article/details/20067595#" class="CopyToClipboard" title="copy" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; text-indent:-2000px; background-color:inherit">copy</a><a target="_blank" href="https://code.csdn.net/snippets/216827" title="在CODE上查看代码片" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; background-color:inherit"><img src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" alt="在CODE上查看代码片" style="border:none; max-width:100%; position:relative; top:1px; left:2px"></a><a target="_blank" href="https://code.csdn.net/snippets/216827/fork" title="派生到我的代码片" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; background-color:inherit"><img src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" alt="派生到我的代码片" style="border:none; max-width:100%; position:relative; top:2px; left:2px"></a>
<div style="position:absolute; left:521px; top:5586px; width:18px; height:18px; z-index:99">
</div>
<div style="position: absolute; left: 394px; top: 5485px; width: 18px; height: 18px; z-index: 99;"><embed id="ZeroClipboardMovie_5" src="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="18" height="18" name="ZeroClipboardMovie_5" align="middle" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=5&amp;width=18&amp;height=18" wmode="transparent"></div></div>
</div>
<ol start="1" class="dp-rb" style="padding:0px; border:none; color:rgb(92,92,92); margin:0px 0px 1px 45px!important; background-color:rgb(255,255,255)">
<li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"><span style="margin:0px; padding:0px; border:none; background-color:inherit">$&nbsp;pod&nbsp;lib&nbsp;lint&nbsp;&nbsp;</span></span></li></ol>
<div class="save_code tracking-ad" data-mod="popu_249"><a href="javascript:;" target="_blank"><img src="http://static.blog.csdn.net/images/save_snippets.png"></a></div></div>
如果一切正常,这条命令执行完后会出现下面的输出:</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px"></span></span>
<div class="dp-highlighter bg_ruby" style="font-family:Consolas,'Courier New',Courier,mono,serif; font-size:12px; width:700.906px; overflow:auto; padding-top:1px; margin:18px 0px!important; background-color:rgb(231,229,220)">
<div class="bar" style="padding-left:45px">
<div class="tools" style="padding:3px 8px 10px 10px; font-size:9px; line-height:normal; font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; color:silver; border-left-width:3px; border-left-style:solid; border-left-color:rgb(108,226,108); background-color:rgb(248,248,248)">
<strong>[ruby]</strong>&nbsp;<a target="_blank" href="http://blog.csdn.net/wzzvictory/article/details/20067595#" class="ViewSource" title="view plain" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; text-indent:-2000px; background-color:inherit">view
 plain</a><a target="_blank" href="http://blog.csdn.net/wzzvictory/article/details/20067595#" class="CopyToClipboard" title="copy" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; text-indent:-2000px; background-color:inherit">copy</a><a target="_blank" href="https://code.csdn.net/snippets/216827" title="在CODE上查看代码片" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; background-color:inherit"><img src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" alt="在CODE上查看代码片" style="border:none; max-width:100%; position:relative; top:1px; left:2px"></a><a target="_blank" href="https://code.csdn.net/snippets/216827/fork" title="派生到我的代码片" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; background-color:inherit"><img src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" alt="派生到我的代码片" style="border:none; max-width:100%; position:relative; top:2px; left:2px"></a>
<div style="position:absolute; left:521px; top:5699px; width:18px; height:18px; z-index:99">
</div>
<div style="position: absolute; left: 394px; top: 5601px; width: 18px; height: 18px; z-index: 99;"><embed id="ZeroClipboardMovie_6" src="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="18" height="18" name="ZeroClipboardMovie_6" align="middle" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=6&amp;width=18&amp;height=18" wmode="transparent"></div></div>
</div>
<ol start="1" class="dp-rb" style="padding:0px; border:none; color:rgb(92,92,92); margin:0px 0px 1px 45px!important; background-color:rgb(255,255,255)">
<li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"><span style="margin:0px; padding:0px; border:none; background-color:inherit">-&gt;&nbsp;WZMarqueeView&nbsp;(1.0.0)&nbsp;&nbsp;</span></span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">&nbsp;&nbsp;</span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">ZMarqueeView&nbsp;passed&nbsp;validation.&nbsp;&nbsp;</span></li></ol>
<div class="save_code tracking-ad" data-mod="popu_249"><a href="javascript:;" target="_blank"><img src="http://static.blog.csdn.net/images/save_snippets.png"></a></div></div>
到此,pod验证就结束了。</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px">需要说明的是,<span style="color:rgb(255,0,0)">在执行pod验证命令的时候,打印出了任何warning或者error信息,验证都会失败!</span>如果验证出现异常,打印的信息会很详细,大家可以根据对应提示做出修改。<br>
<br>
</span></span></div>
<h3 style="margin:0px; padding:0px; color:rgb(51,51,51); font-family:Arial; line-height:26px; font-size:14px"><a name="t10"></a>
<a target="_blank" name="t10" style="color:rgb(51,102,153)"></a><span style="font-size:18px"><span style="font-size:14px">2、本地git仓库修改内容上传到github仓库</span></span></h3>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px">依次执行以下命令:</span></span>
<div class="dp-highlighter bg_ruby" style="font-family:Consolas,'Courier New',Courier,mono,serif; font-size:12px; width:700.906px; overflow:auto; padding-top:1px; margin:18px 0px!important; background-color:rgb(231,229,220)">
<div class="bar" style="padding-left:45px">
<div class="tools" style="padding:3px 8px 10px 10px; font-size:9px; line-height:normal; font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; color:silver; border-left-width:3px; border-left-style:solid; border-left-color:rgb(108,226,108); background-color:rgb(248,248,248)">
<strong>[ruby]</strong>&nbsp;<a target="_blank" href="http://blog.csdn.net/wzzvictory/article/details/20067595#" class="ViewSource" title="view plain" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; text-indent:-2000px; background-color:inherit">view
 plain</a><a target="_blank" href="http://blog.csdn.net/wzzvictory/article/details/20067595#" class="CopyToClipboard" title="copy" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; text-indent:-2000px; background-color:inherit">copy</a><a target="_blank" href="https://code.csdn.net/snippets/216827" title="在CODE上查看代码片" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; background-color:inherit"><img src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" alt="在CODE上查看代码片" style="border:none; max-width:100%; position:relative; top:1px; left:2px"></a><a target="_blank" href="https://code.csdn.net/snippets/216827/fork" title="派生到我的代码片" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; background-color:inherit"><img src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" alt="派生到我的代码片" style="border:none; max-width:100%; position:relative; top:2px; left:2px"></a>
<div style="position:absolute; left:521px; top:5978px; width:18px; height:18px; z-index:99">
</div>
<div style="position: absolute; left: 394px; top: 5883px; width: 18px; height: 18px; z-index: 99;"><embed id="ZeroClipboardMovie_7" src="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="18" height="18" name="ZeroClipboardMovie_7" align="middle" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=7&amp;width=18&amp;height=18" wmode="transparent"></div></div>
</div>
<ol start="1" class="dp-rb" style="padding:0px; border:none; color:rgb(92,92,92); margin:0px 0px 1px 45px!important; background-color:rgb(255,255,255)">
<li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"><span style="margin:0px; padding:0px; border:none; background-color:inherit">$&nbsp;git&nbsp;add&nbsp;-A&nbsp;&amp;&amp;&nbsp;git&nbsp;commit&nbsp;-m&nbsp;</span><span class="string" style="margin:0px; padding:0px; border:none; color:blue; background-color:inherit">"Release&nbsp;1.0.0."</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;&nbsp;</span></span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">$&nbsp;git&nbsp;tag&nbsp;<span class="string" style="margin:0px; padding:0px; border:none; color:blue; background-color:inherit">'1.0.0'</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">&nbsp;&nbsp;</span></span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">$&nbsp;git&nbsp;push&nbsp;--tags&nbsp;&nbsp;</span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">$&nbsp;git&nbsp;push&nbsp;origin&nbsp;master&nbsp;&nbsp;</span></li></ol>
<div class="save_code tracking-ad" data-mod="popu_249"><a href="javascript:;" target="_blank"><img src="http://static.blog.csdn.net/images/save_snippets.png"></a></div></div>
上述命令均属git的范畴,这里不多述。如果一切正常,github上就应该能看到自己刚添加的内容了。如下图所示:</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px"><img src="https://img-blog.csdn.net/20140304144407281?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvd3p6dmljdG9yeQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="" style="border:none; max-width:100%"><br>
</span></span></div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px"><br>
</span></span></div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px"><br>
</span></span></div>
<h2 style="margin:0px; padding:0px; color:rgb(51,51,51); font-family:Arial; line-height:26px; font-size:14px"><a name="t11"></a>
<a target="_blank" name="t11" style="color:rgb(51,102,153)"></a><span style="font-size:18px"><span style="font-size:14px">五、上传podspec文件到CocoaPods官方仓库中</span></span></h2>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px">经过前边的四步操作,你可能以为已经结束了,不幸的是还早着呢。</span></span></div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px">要想一个Pods依赖库真正可用,还需要做最后一步操作,将我们刚才生成的podspec文件上传到CocoaPods官方的Specs仓库中,链接为:<a target="_blank" href="https://github.com/CocoaPods/Specs" style="color:rgb(51,102,153); text-decoration:none">https://github.com/CocoaPods/Specs</a></span></span></div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="color:rgb(255,0,0)">打开这个链接你就会发现,原来我们能使用的,以及我们使用pod search命令能搜索到的所有Pods依赖库都会把它们的podspec文件上传到这个仓库中,也就是说,只有将我们的podspec文件上传到这个仓库中以后,才能成为一个真正的Pods依赖库,别人才能正常使用!</span></div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px">按照git的规则,要想向别人的仓库中添加文件,必须先fork一份别人的仓库,做完相应地修改后,在push给仓库的原作者,等到作者审核通过,然后合并到原来的仓库中。</span></span></div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px">流程明白了以后,自然知道该怎么干了:</span></span></div>
<div style="font-family:Arial; font-size:14px; line-height:26px"><span style="color:#ff0000">注意:之前fork cocaPods master 方式已弃用;使用下面方式:</span></div>
<div style="font-family:Arial; font-size:14px; line-height:26px"></div>
CocoaPods Trunk<br>
CocoaPods Trunk is an authentication and CocoaPods API service. To publish new or updated libraries to CocoaPods for public release you will need to be registered with Trunk and have a valid Trunk session on your current device. You can read about Trunk's history
 and development on the blog, and about private pods for yourself or your team.<br>
<br>
<br>
CocoaPods Trunk is available starting with CocoaPods 0.33. A collection of commands under pod trunk automate the deployment and management of your Podspecs. At any time you can run pod trunk [command] --help to see inline help.<br>
<br>
<br>
&lt;Getting started<br>
<br>
<br>
First sign up for an account with your email address. This begins a session on your current device.<br>
<br>
<br>
We recommend including a description with your session to give some context when you list your sessions later. For example:<br>
<br>
<span style="color:#ff0000"><br>
</span>
<p><span style="color:#ff0000">$ pod trunk register orta@cocoapods.org 'Orta Therox' --description='macbook air'</span></p>
<p><span style="color:#ff0000"><br>
</span></p>
You must click a link in an email Trunk sends you to verify the connection between your Trunk account and the current computer. You can list your sessions by running pod trunk me.<br>
<br>
<br>
Trunk accounts do not have passwords, only per-computer session tokens.<br>
<br>
<br>
&lt;Deploying a library<br>
<br>
<br>
<span style="color:#ff0000">pod trunk push [NAME.podspec]</span> will deploy your Podspec to Trunk and make it publicly available. You can also deploy Podspecs to your own private specs repo with pod repo push REPO [NAME.podspec].<br>
<br>
<br>
Deploying with push:<br>
<br>
<br>
Lints your Podspec locally. You can lint at any time with pod spec lint [NAME.podspec]<br>
A successful lint pushes your Podspec to Trunk or your private specs repo<br>
Trunk will publish a canonical JSON representation of your Podspec<br>
Trunk will also post a web hook to other services alerting them of a new CocoaPod, for example CocoaDocs.org and @CocoaPodsFeed.<br>
<br>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<br>
</div>
<h2 style="margin:0px; padding:0px; color:rgb(51,51,51); font-family:Arial; line-height:26px; font-size:14px"><a name="t12"></a>
<a target="_blank" name="t18" style="color:rgb(51,102,153)"></a><span style="font-size:18px"><span style="font-size:14px">六、查看我们自己创建的Pods依赖库</span></span></h2>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px">如果收到了CocoaPods官方发过来的审核通过邮件以后,你可能很着急的想在自己的电脑上执行pod search命令,看看能不能搜索到自己创建的Pods依赖库。不过你肯定会失望的,因为还需要执行一条命令才能在我们的本地电脑上使用search命令搜索到我们的依赖库:</span></span>
<div class="dp-highlighter bg_ruby" style="font-family:Consolas,'Courier New',Courier,mono,serif; font-size:12px; width:700.906px; overflow:auto; padding-top:1px; margin:18px 0px!important; background-color:rgb(231,229,220)">
<div class="bar" style="padding-left:45px">
<div class="tools" style="padding:3px 8px 10px 10px; font-size:9px; line-height:normal; font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; color:silver; border-left-width:3px; border-left-style:solid; border-left-color:rgb(108,226,108); background-color:rgb(248,248,248)">
<strong>[ruby]</strong>&nbsp;<a target="_blank" href="http://blog.csdn.net/wzzvictory/article/details/20067595#" class="ViewSource" title="view plain" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; text-indent:-2000px; background-color:inherit">view
 plain</a><a target="_blank" href="http://blog.csdn.net/wzzvictory/article/details/20067595#" class="CopyToClipboard" title="copy" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; text-indent:-2000px; background-color:inherit">copy</a><a target="_blank" href="https://code.csdn.net/snippets/216827" title="在CODE上查看代码片" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; background-color:inherit"><img src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" alt="在CODE上查看代码片" style="border:none; max-width:100%; position:relative; top:1px; left:2px"></a><a target="_blank" href="https://code.csdn.net/snippets/216827/fork" title="派生到我的代码片" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; background-color:inherit"><img src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" alt="派生到我的代码片" style="border:none; max-width:100%; position:relative; top:2px; left:2px"></a>
<div style="position:absolute; left:521px; top:9816px; width:18px; height:18px; z-index:99">
</div>
<div style="position: absolute; left: 394px; top: 8142px; width: 18px; height: 18px; z-index: 99;"><embed id="ZeroClipboardMovie_8" src="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="18" height="18" name="ZeroClipboardMovie_8" align="middle" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=8&amp;width=18&amp;height=18" wmode="transparent"></div></div>
</div>
<ol start="1" class="dp-rb" style="padding:0px; border:none; color:rgb(92,92,92); margin:0px 0px 1px 45px!important; background-color:rgb(255,255,255)">
<li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"><span style="margin:0px; padding:0px; border:none; background-color:inherit">$&nbsp;pod&nbsp;setup&nbsp;&nbsp;</span></span></li></ol>
<div class="save_code tracking-ad" data-mod="popu_249"><a href="javascript:;" target="_blank"><img src="http://static.blog.csdn.net/images/save_snippets.png"></a></div></div>
在我的CocoaPods系列教程中的第一篇:<a target="_blank" href="http://blog.csdn.net/wzzvictory/article/details/19178709" style="color:rgb(51,102,153); text-decoration:none">CocoaPods详解之----进阶篇</a>中的最后部分介绍过这条命令,它会将所有的Pods依赖库tree跟新到本地。执行完这条命令,再去执行:
<div class="dp-highlighter bg_ruby" style="font-family:Consolas,'Courier New',Courier,mono,serif; font-size:12px; width:700.906px; overflow:auto; padding-top:1px; margin:18px 0px!important; background-color:rgb(231,229,220)">
<div class="bar" style="padding-left:45px">
<div class="tools" style="padding:3px 8px 10px 10px; font-size:9px; line-height:normal; font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; color:silver; border-left-width:3px; border-left-style:solid; border-left-color:rgb(108,226,108); background-color:rgb(248,248,248)">
<strong>[ruby]</strong>&nbsp;<a target="_blank" href="http://blog.csdn.net/wzzvictory/article/details/20067595#" class="ViewSource" title="view plain" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; text-indent:-2000px; background-color:inherit">view
 plain</a><a target="_blank" href="http://blog.csdn.net/wzzvictory/article/details/20067595#" class="CopyToClipboard" title="copy" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; text-indent:-2000px; background-color:inherit">copy</a><a target="_blank" href="https://code.csdn.net/snippets/216827" title="在CODE上查看代码片" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; background-color:inherit"><img src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" alt="在CODE上查看代码片" style="border:none; max-width:100%; position:relative; top:1px; left:2px"></a><a target="_blank" href="https://code.csdn.net/snippets/216827/fork" title="派生到我的代码片" style="color:rgb(160,160,160); text-decoration:none; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; background-color:inherit"><img src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" alt="派生到我的代码片" style="border:none; max-width:100%; position:relative; top:2px; left:2px"></a>
<div style="position:absolute; left:521px; top:9955px; width:18px; height:18px; z-index:99">
</div>
<div style="position: absolute; left: 394px; top: 8284px; width: 18px; height: 18px; z-index: 99;"><embed id="ZeroClipboardMovie_9" src="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="18" height="18" name="ZeroClipboardMovie_9" align="middle" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=9&amp;width=18&amp;height=18" wmode="transparent"></div></div>
</div>
<ol start="1" class="dp-rb" style="padding:0px; border:none; color:rgb(92,92,92); margin:0px 0px 1px 45px!important; background-color:rgb(255,255,255)">
<li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"><span style="margin:0px; padding:0px; border:none; background-color:inherit">$&nbsp;pod&nbsp;search&nbsp;WZMarqueeView&nbsp;&nbsp;</span></span></li></ol>
<div class="save_code tracking-ad" data-mod="popu_249"><a href="javascript:;" target="_blank"><img src="http://static.blog.csdn.net/images/save_snippets.png"></a></div></div>
就能显示出对应的介绍信息了!</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px"><br>
</span></span></div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
说了那么多,到这里整个Pods依赖库创建过程才算真正结束!小伙伴们,你成功了吗???遇到问题还请留言。</div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px"><br>
</span></span></div>
<h2 style="margin:0px; padding:0px; color:rgb(51,51,51); font-family:Arial; line-height:26px; font-size:14px"><a name="t13"></a>
<a target="_blank" name="t19" style="color:rgb(51,102,153)"></a><span style="font-size:18px"><span style="font-size:14px">七、参考文档</span></span></h2>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px"><span style="font-size:14px">1、<a target="_blank" href="http://guides.cocoapods.org/" style="color:rgb(51,102,153); text-decoration:none">http://guides.cocoapods.org</a></span></span></div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px">2、http://guides.cocoapods.org/making/getting-setup-with-trunk.html</span></div>
<div style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">
<span style="font-size:18px">3、http://blog.cocoapods.org/CocoaPods-Trunk/</span></div>
   
</div>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值