Learning AV Foundation

by Bob McCune on March 11, 2013

AV Foundation is Apple’s advanced Objective-C framework for working with timed media in iOS apps. The framework, as we know it today, was first introduced in iOS 4 and has seen signficant additions and enhancements in both iOS 5 and iOS 6. Starting with Mac OS 10.7 it is also the default media framework for the Mac platform which means Apple is investing the bulk of its media engineering resources in its development. Clearly AV Foundation is important to Apple and if media matters to you and your applications, it should be important to you as well.

AV Foundation is a very impressive framework with a broad and powerful feature set. However, it’s not a particularly easy framework to learn to use. It’s quite large with many classes, functions, and protocols so simply understanding where to start can be a challenge. It also relies on a number of advanced language features such as blocks, KVO, and Grand Central Dispatch so it can be a lot to bite off if you’re just starting out with the Mac or iOS platforms. But the single biggest reason this is a difficult framework to learn is it is so poorly documented. The AV Foundation Programming Guide is badly out of date and the API docs can, at best, be described as sparse. My best guess as to why this is the case is that the development team’s technical writers are always on vacation at release time. This means the only real way to learn to use the framework is through a significant investment of time, lots of experimentation, and the use of one or more high blood pressure medications.

One of my recent goals is to help people better understand how to use AV Foundation. I started working on this last fall when I gave my “Learning AV Foundation” talk at 360|iDev. I’ll be giving an updated version of that talk this week at the Minnesota CocoaHeads meeting. I’ll also be giving a talk entitled “Composing and Editing Media with AV Foundation” at the CocoaConf stops in DC and San Jose in the coming weeks. As part of both talks I have sample apps that I’ll be releasing on GitHub that will illustrate how to make use of the framework.

I’ve got some additional things planned for later this year and will post more about those when I get a bit closer. I like to do at least one useful blog post a year so, who knows, maybe I’ll even find the time to write about the topic on my blog.