CocoaPods

From aoxoaWiki
Jump to navigationJump to search
    • under construction **

website: cocoa pods.org

install:

sudo gem install cocoapods

pod setup --verbose


Tutorials:

[http://www.raywenderlich.com/97014/use-cocoapods-with-swift RayWenderlich - uing CocoaPods with Swift]

Official Guide - Using Cocoapods


Failed to build gem native extension. Header file missing

Caused by having too old a version of ruby.

Solution 1. Use older version of Cocoapods

  sudo gem install cocoapods -v 1.8.4

Solution 2. Upgrade Ruby

  curl -L https://get.rvm.io | bash -s stable
  source /Users/dan/.rvm/scripts/rvm
  rvm install ruby-2.6
  rvm use ruby-2.6.5
  rvm --default use 2.6.5

Then we can install the latest Cocoapods

  sudo gem install cocoapods
  pod setup

Solution 3. Upgrade OSX

Apparently the newest release of OSX has a newer Ruby bundled in. I did not feel like upgrading at this point.


Information source here.