iOS每日一记之——————————契丹的cocopods

首先是cocopods升级问题。。。 cocopods不小心升级成了 1.0.0 bate4 版。。。。

擦 然后 pod install的时候各种报错

The dependency `AFNetworking (~> 2.3.0)` is not used in any concrete target.

<code class="hljs coffeescript has-numbering">The dependency `<span class="javascript">DACircularProgress (~> <span class="hljs-number">2.2</span><span class="hljs-number">.0</span>)</span>` <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> used <span class="hljs-keyword">in</span> any concrete target.
The dependency `<span class="javascript">MBProgressHUD (~> <span class="hljs-number">0.8</span>)</span>` <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> used <span class="hljs-keyword">in</span> any concrete target.
The dependency `<span class="javascript">PSTCollectionView (~> <span class="hljs-number">1.2</span><span class="hljs-number">.1</span>)</span>` <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> used <span class="hljs-keyword">in</span> any concrete target.
The dependency `<span class="javascript">HPGrowingTextView (~> <span class="hljs-number">1.1</span>)</span>` <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> used <span class="hljs-keyword">in</span> any concrete target.
The dependency `<span class="javascript">ProtocolBuffers (= <span class="hljs-number">1.9</span><span class="hljs-number">.3</span>)</span>` <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> used <span class="hljs-keyword">in</span> any concrete target.
The dependency `<span class="javascript">leveldb-library (~> <span class="hljs-number">1.18</span><span class="hljs-number">.1</span>)</span>` <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> used <span class="hljs-keyword">in</span> any concrete target.
The dependency `<span class="javascript">SCLAlertView-Objective-C (~> <span class="hljs-number">0.7</span><span class="hljs-number">.5</span>)</span>` <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> used <span class="hljs-keyword">in</span> any concrete target.
The dependency `<span class="javascript">MWPhotoBrowser (~> <span class="hljs-number">1.4</span><span class="hljs-number">.1</span>)</span>` <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> used <span class="hljs-keyword">in</span> any concrete target.
The dependency `<span class="javascript">MMMarkdown (~> <span class="hljs-number">0.5</span>)</span>` <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> used <span class="hljs-keyword">in</span> any concrete target.
The dependency `<span class="javascript">MJExtension (~> <span class="hljs-number">2.5</span><span class="hljs-number">.16</span>)</span>` <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> used <span class="hljs-keyword">in</span> any concrete target.
The dependency `<span class="javascript">MJRefresh (~> <span class="hljs-number">2.4</span><span class="hljs-number">.12</span>)</span>` <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> used <span class="hljs-keyword">in</span> any concrete target.
The dependency `<span class="javascript">Masonry (~> <span class="hljs-number">0.6</span><span class="hljs-number">.3</span>)</span>` <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> used <span class="hljs-keyword">in</span> any concrete target.</code>

原因是因为版本不服。。。


解决的办法是 打开podfile

在创建Podfile的时候,用这种格式使用,

<code class="hljs livecodeserver has-numbering"><span class="hljs-built_in">platform</span> :ios, <span class="hljs-string">'8.0'</span>
use_frameworks!

target <span class="hljs-string">'nihao'</span> <span class="hljs-built_in">do</span>
  pod <span class="hljs-string">'AFNetworking'</span>, <span class="hljs-string">'~> 2.6'</span>
  pod <span class="hljs-string">'ORStackView'</span>, <span class="hljs-string">'~> 3.0'</span>
  pod <span class="hljs-string">'SwiftyJSON'</span>, <span class="hljs-string">'~> 2.3'</span>
<span class="hljs-function"><span class="hljs-keyword">end</span></span></code>

  • 里面的 nihao 记得替换为自己工程里面的target。这样就基本OK了,执行pod install / pod update 就都可以了。



但是这样之后还是有毛病。。。有一个文件缺失了。。。

最后实在没有办法就想到 了降级。。。对 就是降级。。。


首先你需要先把你的cocopods移除掉

卸载当前版本
sudo gem uninstall cocoapods


然后选择你要回到的版本即可


sudo gem install cocoapods -v 0.39.0




切记不要没事升级cocopods。。。。那酸爽只有你自己知道

你可能感兴趣的:(ios)