Error Codes Wiki

CocoaPods Install Error — Pod Installation and Dependency Resolution Failures on macOS

Warningapplication

Overview

Fix CocoaPods installation errors including pod install failures, dependency conflicts, CDN timeout errors, and Ruby version incompatibilities on macOS.

Key Details

  • CocoaPods is a dependency manager for Swift and Objective-C Xcode projects
  • Installed as a Ruby gem — Ruby version compatibility is critical
  • macOS includes a system Ruby that may be outdated for modern CocoaPods versions
  • CDN-based spec repository replaced the git-based master repo for faster installations
  • M1/M2/M3 Apple Silicon Macs require Rosetta or native Ruby for some pods

Common Causes

  • Ruby version too old — CocoaPods requires Ruby 2.6+ and macOS system Ruby may be older
  • CDN spec repo timeout or network connectivity issues during pod install
  • Pod version conflicts between different pods requiring incompatible versions of the same dependency
  • Apple Silicon architecture mismatch when building pods that lack ARM64 support

Steps

  1. 1Update CocoaPods: 'sudo gem install cocoapods' or use Homebrew: 'brew install cocoapods'
  2. 2Clear CocoaPods cache: 'pod cache clean --all' then 'pod install' again
  3. 3Delete Podfile.lock and Pods directory, then run 'pod install' for a fresh resolution
  4. 4For CDN errors: 'pod repo update' to refresh the local spec cache
  5. 5For Apple Silicon: run terminal with Rosetta or install native Ruby via rbenv: 'rbenv install 3.2.0'

Tags

cocoapodspod-installrubyxcodedependency

Related Items

More in Application

Frequently Asked Questions

Install your own Ruby using rbenv or asdf. System Ruby requires sudo for gem installs and may conflict with macOS updates. rbenv allows per-project Ruby versions without sudo.