Beginning iOS Media App Development

Beginning iOS Media App Development

Ahmed Bakir

Language: English

Pages: 436

ISBN: 1430250836

Format: PDF / Kindle (mobi) / ePub


Beginning iOS Media App Development is a ground-breaking tutorial that explores the near limitless, programmable audio-visual capabilities of the iPhone, iPad and iPod touch using real-world examples and thorough explanations of the code. This book includes detailed step-by-step instructions and important background information from experienced media and utility app developer, Ahmed Bakir.

You'll learn about content creation, playback, and advanced topics, including AirPlay, AVKit, and Swift. Each chapter is framed with a project that illustrates the concepts being discussed and pulls in lessons from other popular apps. You'll even learn about the latest iOS 8 and Xcode 6 media features.

After reading this book, you should be able to build your first rich media app or utility app that utilizes multimedia for the App Store. And if you're a game developer, this book will provide you with tools to help make your game app look even better by integrating native iOS features.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

image-capture interface from a video stream by remembering that a video stream is nothing but a series of images called frames. To capture an image, you just need to extract a frame from the video. To make sure the result is accurate, you want to extract a frame when the image is in focus. In this section, you will see how to use AVFoundation to set up the camera, display a live feed, and capture frames or change settings based on user interface events. To speed up the workflow, this section uses

case 1: { exposureMode = AVCaptureExposureModeLocked; self.exposureButton.titleLabel.text = @"Exposure: Fixed"; break; } } if ([self.currentDevice isExposureModeSupported:exposureMode] && [self.currentDevice lockForConfiguration:&error]) { CHAPTER 4: Advanced Photo Interfaces self.currentDevice.exposureMode = exposureMode; [self.currentDevice unlockForConfiguration]; } else { NSLog(@"could not set exposure mode"); } } The final gesture recognizer duplicates the autofocus logic, except for

setCategory:AVAudioSessionCategoryPlayAndRecord error:&error]; if (error == nil) { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *filePath = [documentsDirectory stringByAppendingPathComponent:@"recording.m4a"]; NSInteger count = 0; CHAPTER 5: Playing and Recording Audio Files while ([[NSFileManager defaultManager] fileExistsAtPath:filePath]) { NSString *fileName = [NSString

instance method. Listing 6-16 contains a complete version of the [self viewDidLoad] method for the main view controller, which includes this step. 160 CHAPTER 6: Using External Audio Sources Listing 6-16. Complete Implementation for Creating a Media Player and Catching Notifications - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, // typically from a nib. self.musicPlayer = [MPMusicPlayerController applicationMusicPlayer]; [self.musicPlayer

that you have a valid reference to your sound file, you need to create a system sound ID object (SystemSoundID) to play it, using the AudioToolbox framework. You’ll reuse this object throughout the calling class, so make sure you declare it as an instance variable. Because you need to use C syntax for the AudioToolbox classes, you need to declare the variable within your class’s @implementation block: SystemSoundID clickSoundId; 168 CHAPTER 6: Using External Audio Sources In the sample

Download sample

Download