Receiving Files through AirDrop using Xamarin.iOS

Receiving Files

In order to receive files from AirDrop, two steps must be taken.

  1. Register your application as a handler for a specific file type.
  2. Actually handle the AirDrop action.

The first item can be done by adding the correct UTI in info.plist file. It’s worth noting that there are some system level UTIs, such as images (public.jpeg, public.png), that cannot be used/handled within an app. Below is an example for handling PDF files.


Item 2 is taken care of by overriding the OpenUrl method in the AppDelegate. AirDrop places the file in your applications /Documents/Inbox . This directory is read-only, so if the file needs to be modified it must be copied off somewhere.

        public override bool OpenUrl(UIApplication application, NSUrl url, string sourceApplication, NSObject annotation)
            new UIAlertView("Airdrod File Received!", "File " + url + " received!", null, "OK", null).Show();
            return true;

I have update the sample on GitHub to include these changes.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s