Book Image

Xcode 4 Cookbook

By : Steven F. Daniel
Book Image

Xcode 4 Cookbook

By: Steven F. Daniel

Overview of this book

<p>The release of iOS 6 comes packed with over 1,500 new APIs and 200 new features. Xcode 4 Cookbook will teach youhow to integrate iCloud storage and how to go about using the Facebook and OpenGraphi APIs, as well as providing you with practical step-by-step recipes covering User Interfaces, data management, multimedia, localisation services and maps, right through to application deployment to the Apple App Store. You will soon be mastering the technology and the skills needed to create some amazing applications.<br /><br />"Xcode 4 Cookbook" will help you learn how to build some powerful applications using iOS 6 and the various frameworks. You will soon master how to incorporate iCloud, Facebook, and the OpenGraph APIs and apply various image filters and transitions using Core Image integration within your applications. By using the book’s step-by-step approach, you will soon master the technology and the skills needed to create some amazing applications.<br /><br />"Xcode 4 Cookbook" provides you with the skills and knowledge and practical recipes on how to go about developing useful applications that can be used within the industry.<br /><br />You will start by learning how to go about downloading and installing the Xcode Development Tools, learn about Interface Builder to create the visual user interfaces, connecting the objects using Outlets and Actions, and learn how to compile/debug your applications.<br /><br />Finally, you will learn how to capture media with the iOS camera and play back video content using Airplay to wirelessly stream videos to an Apple TV device, using the AV Foundation framework, as well as using the Core Image and Core Graphics frameworks to create amazing image effects using the built-in features.</p>
Table of Contents (19 chapters)
Xcode 4 Cookbook
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Index

Implementing the Single Sign On (SSO) feature


In this recipe, we will learn how to implement the Single Sign On feature of the Facebook iOS SDK that will enable our application to communicate with Facebook.

The process of using SSO works by redirecting the user to the Facebook iOS application on their device, and presenting them with an authentication dialog box, showing only those permissions that your application has been configured to use.

Getting ready

Following on from our previous recipe, ensure that our SocialNetworkApp project file is open.

How to do it...

To begin, follow the simple steps as outlined in the given order:

  1. Open the AppDelegate.hinterface file from the Project Navigator.

  2. Next, modify the interface file as shown by the highlighted code sections:

    //  AppDelegate.h
    //  SocialNetworkApp
    //  Created by Steven F. Daniel on 11/12/12.
    //  Copyright (c) 2012 GenieSoft Studios. All rights reserved.
    #import <UIKit/UIKit.h>
    #import "FBConnect.h"
    
    @class ViewController;
    
    @interface...