Publish your pods to cocoapods trunk and issue records

Source: Internet
Author: User

These two days are ready to add some of the gadgets that were written earlier to Pods Library, the reference to some of the information after the operation, in fact, also encountered some problems, recorded, problems and solutions in the back.

The reference content is reproduced as follows:

first updated with the Trunk later, CocoaPods need to 0.33 versions above, with pod--version View, if the version is low, needs to be updated, before the Update method is introduced.  

Next Registration Trunk

pod Trunk Register Orta @cocoapods . org ' Orta Therox ' --description= ' MacBook Air '

you need to replace the mailbox and name when registering, plus --verbose can see detailed information.  

Then you will receive an email and need to click Verify.

pod Trunk me // View your registration information

Of course, if your pod is maintained by multiple people, you can also add other maintainers

pod trunk add-owner aranalytics Kyle @cocoapods . org

Create Podspec

Execute Command :

Pod Spec Create Hzwebviewcontroller

is generated under the current directory hzwebviewcontroller.podspec file, and then we edit this file.  

Podspec There are many comments in the file. Let's see an example .

It is clear at a glance that there is no one by one explanation, and of course, there are far more configuration items.

OK after the configuration is complete, you need to put your source code Push to the GitHub on, Tag a version number and publish a Release version, so Podspec in the file S.source value can be accurate.

These operations are not part of the scope of this study.

Submit

When the above work is done, we can start   trunk push    

pod trunk push   command will first verify your local podspec file ( Is there an error ) spec file to trunk podspec file conversion to required json file  

First Step verification Podspec you can do it yourself. pod spec Lint Peanut.podspec

after successful deployment, CocoaPods will be in Twitter on @ You're

we can look at our submitted names for : Hzwebviewcontroller of the pod

Pod Search Hzwebviewcontroller

we can also be in the local  ~/.cocoapods path , after the converted json file

? problems in the actual operation:

1.pod Verify the local Podspec files are fast and use pod Trunk me viewing your own information can also respond quickly, but when using the

pod Trunk Push command, you need to be very patient, because this step is taking too long.

2.push after success, I try to use pod Search command to find your own control, found unable to search, and later found the commit, you need to use pod Setup command to update the library, the actual update is stuck for a long time, and finally through the wall VPN the operation was successful. During this time, I encountered an error such as the ' master ' of CocoaPods was not able , and finally by deleting the previous cache rm-fr ~/.cocoapods/repos/master

re-use pod Setup The operation was successful.

The final summary of the following steps:

1. After you publish your open source library, you need to tag the version number , otherwise you will not be able to complete

2. Register pod trunk

Pod trunk register [email protected] ' Your name '--description= ' MacBook Air '

2.CD to the project directory, create the Podspec file

Pod Spec Create Yourpodprojectname

3. Modify the relevant information in the Podspec file, which is important , check, cannot have any warnings or errors

Pod Spec Lint Yourpodprojectname.podspec

4. Publish to pod trunk

Pod Trunk Push Yourpodprojectname.podspec

5. update pod library

Pod Setup


You can then search and use it.


Copyright NOTICE: This article is for bloggers original article, welcome reprint but please keep the article source. http://blog.csdn.net/u010124617

Publish your pods to cocoapods trunk and issue records

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.