Problem
Manage 3rd party libraries in Objective-C projects.
Solution
Use Cocoapods for library management in Objective-C projects.
Step 1
Install cocoapods gem and initiliaze.
1 2 3 4 |
|
Step 2
Create a Podfile and list dependencies.
1 2 |
|
1 2 3 |
|
Step 3
Now install dependencies.
1 2 3 4 5 6 7 8 |
|
Cocoapods creates an Xcode workspace and Pods static library project, then links it with you project. All your dependencies will be available through that library. As the output suggests, you will use foo.xcworspace from now on.
1
|
|
Discussion
Cocoapods certainly makes it easier to manage libraries in your project. You can search the library you want to use.
1
|
|
As well as Xcode workspaces have some advantages described in Xcode Concepts which we discuss in Core Data: Automate master data preloading.