Exploring the AVFoundation framework

Obtaining direct access to the iPhone's camera is possible through the AVFoundation framework. The AVFoundation framework is used to record, edit, and play back audio and video. If you look up the documentation for AVFoundation, you'll find that it's a huge framework that contains a whole range of audio- and video-related classes. In order to build the login screen for our app, we will focus on the classes that are related to reading the camera data and displaying images from the camera on the screen in real time.

The range of possibilities that AVFoundation offers is large enough to cover multiple chapters, so we will focus on a small section of capabilities of AVFoundation. However, this book wouldn't be complete if we didn't at least skim over some of its other classes and capabilities.

We'll take a look at two relatively simple use cases for AVFoundation before we move on to implementing the video feed background for ArtApp. First, we will take a look at AVPlayer and how it can be used to play back a list of audio streams. Next, we'll take a look at video playback and how picture-in-picture works for the iPad.