Swift.iOS: CocoaPods – The Podfile

In this lesson

Here is a quick introduction to what CocoaPods is all about, defining dependencies for your Xcode projects and the way you do that is through the Podfile. Find out what the Podfile is and what it is used for.

Kyle Roberts
Swift Guru at Large

Kyle's Series

Transcript

Tap on time to skip ahead

00:11

Hello world. Kyle here with Brax.tv. I’m on the CocoaPods.org site for CocoaPods on this Get Started tab section down here. We’re going to talk about the Podfile. What is the Podfile? Why is it important? The Podfile is sort of the center of everything CocoaPods, at least from the user’s standpoint. In this Get Started section it talks a little about it, we can see some basic syntax and what you need to do to get a Podfile. We’re just going to talk about what the actual Podfile is.

00:49

After you’ve installed CocoaPods, or once you have access to your Podfiles, depending on how you’ve created it, it’s going to be a blank document or it might have some of these headers at the beginning. The Podfile is basically where you can define the different CocoaPods that you want to download. Each of these pods is pointing toward an open source library or framework on GitHub, which is great. All you have to do is type in a string of the name of the repo, and then you can specify the version, you can specify the targets that you want to work with as well as a few other things.

01:33

Let’s see here, I have one commented out because I haven’t used it yet. I don’t need to have it installed. Then after you have your Podfile in a good space, in a good way, then when you use CocoaPods it’s going to know, “Hey, this is the Podfile, it has all the information I need to create this CocoaPods target and set up CocoaPods for this project.” It’s already set up to maybe update your pods. That’s what the Podfile is.

Additional Info

Register to get access to additional resources and info.