Using CocoaPods to manage your iOS dependencies

| 2 min. (261 words)

We have recently introduced Raygun4iOS so that you can now track errors in your iOS applications with Raygun. I wanted to take a moment to let you know about the easiest way to integrate Raygun into your iOS application.

CocoaPods. This tool can be very beneficial to you in setting up not only Raygun but thousands of other libraries. I wanted to share an introduction to getting set up with CocoaPods.

CocoaPods is built with Ruby and can use the default installation of Ruby included with OS X. To get started we need to install the CocoaPods Ruby Gem.

$ sudo gem install cocoapods

You then need to list the libraries you want to use in a ‘Podfile’ in your project directory

$ touch Podfile
platform :ios
pod 'Raygun4iOS', '1.1.1'

Now you can install Raygun4iOS into your project

$ pod install

You will now need to open the Workspace file (*.xcworkspace) that CocoaPods has generated rather than your existing project file. Now you can import your dependencies and use them

#import <Raygun4iOS/Raygun.h>

You can search for more dependencies to use at the CocoaPods site

If you haven’t used CocoaPods before I hope this shows you how easy it is to use and add dependencies to your project. If you’re already using CocoaPods then it’s time to add Raygun to your Podfile and blast your iOS errors!

Create your account

Every Raygun user gets a 14 day trial – no credit card required. You can sign up in a matter of seconds. It couldn’t be easier to be improving your software quality.