PacktLib: Xcode 4 Cookbook

Xcode 4 Cookbook


About the Author


About the Reviewers


Getting and Installing the iOS SDK Development Tools


Downloading and installing the iOS SDK

Using Xcode to create an iOS project

Using Interface Builder to create the user interface

Building the user interface for our application

Creating outlets to Interface Builder objects

Creating actions that respond to user actions

Compiling your project

Using the iOS Simulator to test your applications

Configuring and using compiler directives

Debugging your iOS applications using Xcode

Using the Clang Static Analyzer to examine your code

User Interfaces – Creating the UI


Adding and customizing views

Using labels to display text

Obtaining user input through the use of buttons

Displaying an image within the view

Displaying and editing text

Using the iOS device keyboard

Displaying the progress to the user

Adding a toolbar to a view

Fading a view in and out

Creating a custom table view controller

Adding a table view to a view controller

Handling different iOS devices

Using Storyboards


Configuring storyboards for a project

Creating a Twitter application

Creating storyboard scenes

Configuring storyboard scenes

Applying transitions to storyboards

Composing a tweet

Adding photos to a tweet

Preparing transition to another view controller

Presenting storyboard view controllers programmatically

Using Xcode Instruments


Introducing Xcode Instruments

Tracing iOS applications

Running and profiling an iOS project

Detecting virtual memory faults

Detecting memory leaks

Handling runtime errors

Handling compile-time errors

Adding and configuring Instruments

Working with the Location Services and the MapKit Frameworks


Adding the CoreLocation and MapKit frameworks

Building a simple CoreLocation application

Determining the current GPS location

Adding and working with the MapView control

Adding overlay regions to maps

Adding annotation placeholders to the map

Reversing geocode address information

Working with the different map types

Storing Documents within the Cloud


Storing and using documents within iCloud

Working with the iCloud storage APIs

Detecting file version conflicts within iCloud

Building the iCloud application

Requesting entitlements for iCloud storage

Configuring iOS devices to use iCloud

Working with Different Multimedia Resources


Selecting images and video from the camera roll

Capturing media with the camera

Playing video with Apple TV integration

Playing music using the MediaPlayer framework

Using the iOS device's microphone to record

Animating views

Drawing customized text

Drawing lines and curves

Drawing and filling shapes

Applying color effects using Core Image

Applying transition effects

Working with the CoreData and GameKit Frameworks


Adding the GameKit and MessageUI frameworks

Building the Core Data data model

Creating the Core Data model files

Adding and configuring the Storyboard

Creating the Books Library user interface

Displaying data within the Table View

Inserting data within our Core Data data model

Delete an item from the Table View using Core Data

Reordering rows within a Table View

Filtering and searching for data within a Table View

Working with the different keyboard styles

Transferring data to another device using bluetooth

Implementing e-mail messaging

Creating a Social Networking App with the Facebook iOS SDK


Downloading the Facebook iOS SDK

Registering your iOS applications with Facebook

Building a simple social networking application

Adding the Facebook SDK and dependencies to your project

Implementing the Single Sign On (SSO) feature

Implementing the View Controller class

Requesting additional Facebook permissions

Using the Graph API to read JSON data

Integrating with the Facebook social channels

Handling Facebook errors within your application

Packaging and Deploying Your Application


Setting up your iOS development team

Creating the iOS development certificate

Obtaining the development certificate from Apple

Registering your iOS devices for testing

Creating your application App IDs

Creating the development provisioning profiles

Using the provisioning profile to install the app on an iOS device

Preparing an application for submission to the App Store using iTunes Connect

Archiving and submitting apps using Xcode 4

Exploring the MultiTouch Interface

Exploring the MultiTouch Interface

Exploring the MultiTouch Interface

Exploring the MultiTouch Interface

Exploring the MultiTouch Interface

Exploring the MultiTouch Interface

Exploring the MultiTouch Interface