Creating your own COCOAPOD

Now a days it is fairly common to use CocoaPods to your project as the dependency manager for your iOS and MacOs projects. I have been using it for quite some time now; and to my utter delight, oh boy, I am glad I got to know how to use this masterpiece!

Now to a fairly uncommon scenario, what if you want to create your own pod?

It is not uncommon for developers like me, who have been working in the industry for quite a few years to have their own tricks and tweaks. You might have made quite some subclasses/libraries/UI controls to make your life easier and have been using them to your projects. Well done sire! But have you ever thought of sharing your awesome work? Oh come on dude! We; the developers; rely so much on the open source community and it’s pretty damn cool to be one of the contributors! So, how do you make your own awesome pod? Well, I am not going to write all those steps, as it is already in the web!!! The guys from have written this awesome tutorial on how to make your own pod! So go check it out here: Creating Your First CocoaPod.  You can also get a good detailed read from Official Guide from CocoaPod.

From the tutorial it is possible, you will face this error on the following command (in the tutorial Step 3: Pushing to Specs Repository):

pod trunk push YOUR_POD.podspec 

[!] You need to register a session first.

Don’t worry about it, you need to register yourself for the session. Just run:

$ pod trunk register <Your Email> 'Your Name' --description='Your Description'

You’ll have the following output to confirm the session:

[!] Please verify the session by clicking the link in the verification email that has been sent to YOUR EMAIL

You must click a link in an email Trunk sends you to verify the connection between your Trunk account and the current computer. You can list your sessions by running:

pod trunk me

Trunk accounts do not have passwords, only per-computer session tokens.

You can learn more from the cocoapods official site here.

This Post Has 7 Comments

  1. Mehedi Hasan

    You are right. We rely very much on the open source and its our duty to to be one of the contributors.

    Thanks for sharing nice article. Keep it up brother. 🙂

  2. Md. Aminul Islam Bhuiyan

    Great post…
    but it is really good to use CocoaPods rather than using the Library? I was confused form the start. Which one is better?

    1. Thanks! I was confused too, but when you get start using cocoapods you will see the difference by yourself. It is fairly easy to use and you don’t have to worry a single thing about dependency complications (You know how messy that can get over the time!).

  3. Dipayan

    Awesome post, very helpful, please keep posting more like this.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.