AirDrop Examples

Last Revision:
Version 1.0, 2013-10-17
"AirDropSample" illustrates three scenarios for incorporating AirDrop into an app.
Build Requirements:
Xcode 5.0, iOS SDK 7.0
Runtime Requirements:
iOS 7.0

"AirDropSample" demonstrates three use cases for incorporating AirDrop into an app.

1) Sending/receiving a URL with a custom scheme via AirDrop

URLs can be used as a simple way to transfer information between devices. Apps can easily parse a received URL to determine what action to take. After an app registers a URL scheme (including custom schemes), the system will know to launch that app when a URL of that type is received.

2) Sending/receiving an instance of a custom class as data via AirDrop

Often an app will want to send some data it has, for instance a serialized object, to another device. Apps can easily do this by attaching a UTI to that data, and then registering to accept that UTI on the receiving side.

3) Asynchronously preprocessing content after the user decides to send via AirDrop

There are certain circumstances when a piece of content needs to be preprocessed before a send. The APIs allow for this preprocessing to happen asynchronously.