Cocoapods installation and use and configuration of private libraries

Source: Internet
Author: User

For more information about the functions of pods, see the encyclopedia.

1. Installation (requires a ruby environment ):

sudo gem install CocoaPods

2. Search Class Library:

The name of the pod Search Class database. Fuzzy search (for example, afnetworking) is supported)

3. Usage:

A. Open the terminal and use the CD command to locate the project root path that requires cocoapods:

B. Create a podfile in the project. Run the following command: Touch podfile; 6.0 (the lowest supported IOS version must be specified in some libraries ).

C. Add a database. Take mbprogresshud as an example:

. Run the SEARCH Command: pod search mbprogresshud. The following prompt is displayed:

-> MBProgressHUD (0.9)   An iOS activity indicator view.   pod ‘MBProgressHUD‘, ‘~> 0.9‘   - Homepage: http://www.bukovinski.com   - Source:   https://github.com/matej/MBProgressHUD.git   - Versions: 0.9, 0.8, 0.7, 0.6, 0.5 [master repo]

. In the created podfile, enter 'mbprogresshud ',' ~> 0.9'

D. Run the initialization command: pod install.

Note: After completing the preceding steps, open the project with cocoapodsdemo. xcworkspace instead of the previous. xcodeproj file. In this way, all the databases you add will appear in the workspace.

Cocoapods installation and use and configuration of private libraries

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.