Some understanding of Cocoapods

Source: Internet
Author: User

In this blog, I will share what I learned from Cocopods.

If you use Cocoapods, there will be something in your. gitignore file.

This question is mentioned in debate on So, but I recommend tracing only Podfile and podfile.lock files. Pods file,. xcworkspace file, all in. Gitignore.

You can get more information about this problem on the cuckoo for Cocoapods.

Pod Install vs pod update

Pod Install

The role of the pod Install command is to download and install the latest third-party library files in Podfile. lock File, write the version number of each third-party library file that is already installed. The purpose of this file is to record the version number of the third-party library files that are installed, and to lock down their versions.

Pod Update

When you run the pod Update command for some library files, Cocoapods will view the latest versions of these library files without taking into account the version numbers in the Podfile.lock file that correspond to the library files. It will update the pod to the latest version (as long as it complies with the version limit requirements of the Podfile file).

For more information, please read detailed presentation of the Commands,cocoa? Pods on Nshipster.

You can edit the source of the pod file.

Yes, you can edit the source of the pod file, and your changes will be rewritten by the next pod update, unless you are using: path, for this knowledge point, see Reply by @orta.

Your. xcodeproj file remains intact.

In fact, after the first pod installation, the. xcodeproj file remains intact. Just as Cocoapods pointed out.

Cocoapods's going to come out. Key A new Xcode project, this project will create a static library file, the role of the library file is to build a dependency on the third-party library files, and link them to a file called LIBPODS.A. This static library file becomes a dependent file for your original project. The Xcworkspace file is generated and can be used normally. This method allows the original xcodeproj file to remain intact.
The files in the sandbox are not synchronized with Podfile.lock because of Manifest.lock.
Each time you run the pod Install command, a copy of the Podfile.lock file is generated. If you have ever encountered a sandbox that is not synchronized with Podfile.lock files, this is because the Podfile.lock files and podfile.lock files in the sandbox are not the same. Because the pods directory is not always subject to the version control of the Podfile.lock file, there is a way to ensure that the developer is updated before running the pods, the app crashes, or a strange compilation error is reported.
Reference documents

February Tech Talk:cocoapods

uikonf 2014-orta Therox:cocoapods

MCE 2014:orta Therox–cocoapods and the road to 1.0

Some understanding of Cocoapods

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.