First, installation
1. Open the terminal sudo gem install cocoapods command explanation: Install Cocospods Kit 2 with gem, pod Setup command explanation: Install COCOSPODS toolkit hint with gem: After installing Cocoapods, in the command line later , directly using the pod to find third-party libraries 1, pod search json2, Command interpretation: Search results in third-party frameworks that contain "JSON" in the Pods Library include: (1) Framework main functions (2) format in pod configuration file (3) Developer Home page (4) Source code warehouse URL, mostly stored on GitHub (5) version history (6) Other accessibility tips: If you don't know if a frame is available, you can go to GitHub and look at the basic use of new project in Xcode to open the Terminal CD project directory Pwdtouch PODFILEOPEN-E podfile-Enter things such as the following:
Platform:ios, ' 7.0 '
Pod ' afnetworking '
-Save exit, back to Terminal-pod install-command explanation: After installing and configuring the Xcode project as set up in Podfile, Double-click Xxx.xcworkspace the related configuration of third-party libraries used in all projects has been completed note: When using Pods configuration, the #import header file requires
#import <AFNetworking.h>
Add or upgrade a third-party library (1) Edit the Podfile file (2) and then open the terminal, enter the project directory by entering the following command if you upgrade a third-party library, enter:-pod update If you added a new third-party library, enter:-pod install