
CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. It has over 51 thousand libraries and is used in over 3 million apps. CocoaPods can help you scale your projects elegantly.
Install
CocoaPods is built with Ruby and is installable with the default Ruby available on OS X. We recommend you use the default ruby.
Using the default Ruby install can require you to use sudo when installing gems. Further installation instructions are in the guides.
1 |
|
We also have a Mac app for CocoaPods. It only gets major releases ATM though.
< !–more–>
Get Starded
1 |
platform :ios, '8.0' |
Tip: CocoaPods provides a pod init command to create a Podfile with smart defaults. You should use it.
Now you can install the dependencies in your project:
1 |
$ pod install |
Make sure to always open the Xcode workspace instead of the project file when building your project:
1 |
open App.xcworkspace |
Now you can import your dependencies e.g.:
1 |
#import <Reachability/Reachability.h> |




近期评论