iOS builds a private pod warehouse

Source: Internet
Author: User

Contact pod later found to use it to manage the third-party code is very convenient, after the creation of their own modules to put on the idea of the pod, after a series of Baidu and Google, basically achieved, the following is my realization of the steps and understanding:

Standard POD usage process

and ours is this.

I. Generating a private pod warehouse

If the pod is installed then there will be a pod warehouse locally

The private repositories we are going to generate will also be in this directory.

1. Need a git address (e.g., https://github.com/liuxiaolong-nm/cyhz_pods_repository.git)

2. Create a private pod spec repo that is generated with a git repository binding (1th step), execute commands such as: Pod repo add lxlspecs https://github.com/ Liuxiaolong-nm/cyhz_pods_repository.git , after generating a self-named pod spec repo on this machine,

Two. Create Pod Lib

Prepare a git address such as: [Email protected]:liuxiaolong-nm/ios_pod_library_test.git,

Find a Directory Execution command: Pod lib create name, followed by a pod dependent project

such as: Pod Lib create Ios_pod_library_test will let you select some properties after

After

Commit this project to Git and execute the upload command:

git Add.
Git commit-s-M "Initial Commit of Library"
git remote add origin [email protected]:liuxiaolong-nm/ios_pod_library_test.git
Git push Origin Master

After the first commit, I propose to use Git to manage the source tree.

And then we'll label it.

Next, develop the Podspec file for the purpose of editing pod Lib

Perform pod lib Lint command proofing file availability

Note: S.summary and s.description can not be the same as the description text, s.version at least 3 numbers such as: 0.1.0, otherwise the proofing fails.

Proofreading Success!

Now let's add the module code to pod lib.

The code in pod Lib must be placed in this file, and the resource file will be placed in the assets folder.

After adding push to git remote.

Test, create a new pod project modify the Podfile file

Execute Command pod update

Ok!

The next article will explain the daily maintenance of pod lib.

iOS builds a private pod warehouse

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.