App uses a tripartite library is essential, because the open source Library will not be updated regularly, we use the library to update, use Cocoapods to manage will be more convenient, as long as a command can be implemented to update all the library, cocoapods installation here is not introduced, Only describes how to use after installing Cocoapods.
Create a new iOS project, use the command-line tools to access the project's root directory, creating a file called Podfile, and note that there are no suffixes. Content is:
Platform:ios, ' 8.0 '
target ' your project name ' do
pod ' afnetworking ', ' ~> 3.0 '
pod ' masonry
' end
Save the exit when you are finished editing. If not clear vim tools can Baidu check how to use, the operation of their own, so the impression of deeper.
Enter on the command line: Pod Install
But I want to close the project first, then close the project and try again
The installation is complete at this time. Open again in the working range, double-click the following file
Opened in a working range, with one more pods project
Here, we have completed an open Source library management
If you have finished installing the pod or opened it in project mode, you will report a link error
Just close the project and open it in Workspace mode.