使用CocoaPods管理Objective-C專案

更新現有的Pods

專案本身已經含有CocoaPods管理時,我們在使用前必需要更新一下內容,如果有新版的,設定檔就可以進行更新來維持Pods的版本。

pod update`

使用的版本沒有更新的狀況下:

Analyzing dependencies
Downloading dependencies
Using AFNetworking (2.0.3)
Generating Pods project
Integrating client project`

假設版本為2.0.2並且更新到最新版(2.0.3)的狀況下:

Analyzing dependencies
Downloading dependencies
Installing AFNetworking (2.0.3)
Generating Pods project
Integrating client project`

有更新版就會進行Pod的重新安裝。

總結

CocoaPods使用Ruby撰寫而成的,並且會讀取Podfile設定檔來建立整個環境,初次建立時需要下安裝的指令pod install,爾後使用只需要下更新的指令pod update就完成整個管理,在開啟專案時要開啟副檔名為xcworkspace,不再是xcodeproj副檔名。


version 0.2 danny @ 35g.tw @ 2014-01