Search code examples
xcodecocoapods

Xcode build step to verify if Cocoapods are up to date


I have an iOS project that is already set up with Cocoapods. I use a bunch of libraries, but sometimes I add/remove/update libraries between different branches and forget to run pod update in the terminal to make sure I have all the correct pods for the branch I'm working on.

What I'm trying to set up a build step in my project (iOS 7, Xcode 5) that performs the following actions:

  1. Check if the Pods are currently up to date, i.e. determine the need to run pod update.
  2. If the Pods are up to date, do nothing.
  3. If the Pods are NOT up to date, run pod update/pod install

I'm looked through the documentation in the Cocoapods website and couldn't find the solution to my problem.

Any pointers are appreciated!

Cheers, Mário


Solution

  • There are a couple of Xcode plugins that make things easier but I don't think they will do auto updating:

    Handy Xcode Plugin For Working With CocoaPods: ManiacDev
    An Xcode 5 Plugin For Easier Cocoapods Usage And Podfile Creation: ManiacDev

    CocoaPods for Xcode: kattrali/cocoapods-xcode-plugin