OOZOU
Get in Touch
Back to Blog

CocoaPods, a Gem for iOS Development

CocoaPods is a dependency manager used in iOS development written in Ruby. I wanted to investigate how CocoaPods leveraged the advantages of Ruby and pre-existing ruby projects to become one of the essential parts of the iOS development workflow.

December 14, 2020
3 min read
CocoaPods, a Gem for iOS Development

What is CocoaPods?

CocoaPods is a dependency manager for Cocoa and Cocoa Touch projects which covers macOS, iOS, watchOS and tvOS development. It is written in Ruby and distributed through RubyGems.

How popular is it?

According to the official website, CocoaPods has over 59 thousand libraries and is used in over 3 million apps. The gem has been downloaded more than 25 million times. Although the Swift Package Manager is gaining momentum as a first-party tool, CocoaPods is still the most popular way to distribute Swift and Objective-C code.

Popular CocoaPods libraries:

Alamofire

  • HTTP networking library written in Swift
  • Downloaded more than 42 million times
  • Used in more than 660 thousand apps

Google Firebase

  • The Firebase team says "We recommend using CocoaPods to install the libraries."
  • Downloaded more than 23 million times

Why Ruby?

Usually, a package manager is written in its target language. NPM is in JavaScript. RubyGem is in Ruby. Go modules are in Go. But, CocoaPods, the primary choice for Swift and Objective-C, is in Ruby. I was wondering why it started with Ruby. So, I asked Eloy, the founder of the project.

According to the creator Eloy Durán:

1. Duck typing and monkey patching

Ruby's duck typing and monkey patching make it easier for developers to customize CocoaPods to their projects. This helped a lot in the early phase of CocoaPods development when it was not able to cover all of the different cases. If CocoaPods was in Swift or Objective-C and compiled in binary, it would have been very hard to be extended freely. 2. RubyGems CocoaPods uses bundler to parse dependency versions and RubyGems's infrastructure for distribution. 3. Creator's experience Eloy had been using Ruby to write Cocoa apps so he was comfortable to write ruby code modifying Xcode projects.

Expanding the boundaries

At the time when Eloy started CocoaPods, many factors led Eloy to choose Ruby. Among them, the most interesting one for me is his familiarity with Ruby while developing macOS apps which are seemingly in different fields. He noticed the problem of missing dependency management and solved the problem with the best tool in his hands. If he was trying to make CocoaPods with Objective-C, it might take much longer and effort for it to be as popular as it is today. I think it is also important to make time to learn and try different languages and frameworks outside of one's field and language. They can be used directly or indirectly. For example, the foundation concept of Swift UI is not invented with it but inspired by React. Under the umbrella of software development, we are dealing with similar problems just on different platforms. So why not look around how others are approaching them?

Related Articles

How Can I Design a Software: A Beginners Guide for Business Owners

How Can I Design a Software: A Beginners Guide for Business Owners

Designing software is an exciting yet complex process that involves creativity, logical thinking, and problem-solving skills.

Read More →
The Future of Edge Computing: What Businesses Need to Know

The Future of Edge Computing: What Businesses Need to Know

The digital landscape is evolving rapidly, and businesses must adapt to keep up with rising demands for speed, efficiency, and real-time processing.

Read More →
The Future of Retail: AI, AR, and Digital Transformation Trends

The Future of Retail: AI, AR, and Digital Transformation Trends

Retail is evolving at an unprecedented pace, driven by AI (Artificial Intelligence), AR (Augmented Reality), and digital transformation technologies, revolutionizing the retail industry. Traditional brick-and-mortar stores are no longer just about selling products—they are becoming smart, interactiv

Read More →

Have a Project in Mind?

Let's discuss how we can help bring your ideas to life with our expertise in web and mobile development.

Start a Conversationhello@oozou.com
OOZOU Logo

Bangkok · Singapore · Hong Kong

X
Facebook
Instagram
LinkedIn

Services

  • Web Development
  • AI Agents & Generative AI
  • Mobile App Development
  • Data Analytics & Engineering
  • UI/UX & Product Design
  • Digital Transformation

Company

  • About Us
  • Careers
  • Blog
  • Whitepapers
  • Case Studies
  • Today I Learned
  • Contact

More

  • Industries
  • Get an Estimate
  • Partner Network
© 2026 OOZOU. All rights reserved.
Privacy PolicyCode of ConductABAC Policy