Book Image

Swift Cookbook

By : Costa
Book Image

Swift Cookbook

By: Costa

Overview of this book

If you are an experienced Objective-C programmer and are looking for quick solutions to many different coding tasks in Swift, then this book is for you. You are expected to have development experience, though not necessarily with Swift.
Table of Contents (13 chapters)
12
Index

Being a film critic


There are times that an app needs to transfer information from your device to the computer and vice versa, for example, you might be watching a movie on your iPad on your way home (assuming that you are not the driver), and then you will continue watching it on your computer.

For scenarios like this one, Apple has created a new technology called Handoff. The idea is simple: continue the task you are doing on another.

In this recipe, we will create an app where the user can start writing his opinion about a film on one device and check it on a Mac application.

Getting ready

The Handoff framework has software and hardware requirements. The software requirements are Xcode 6, iOS 8, and Mac OS X Yosemite (10.10). Therefore, make sure that your hardware is able to use all of these software versions (or higher). Unfortunately, Handoff can't be used with the simulator. Another software requirement is that both devices (the computer and your Apple mobile device) must be logged into...