0

I'm scratching my head trying to determine how to detect if a device supports airdrop. My thinking was to try to get the UIActivity for airdrop and call canPerformWithActivityItems: on it. The problem is I can't figure out how to get the UIActivity for airdrop, anybody know how to do this? Does anybody have a different approach to solve this problem?

Thanks, Omri

  • Curious - why do you need to know? If you use `UIActivityController` it will appear or not. Generally you don't need to know ahead of time. – rmaddy Dec 03 '13 at 17:01
  • 2
    @rmaddy I've run into this when I wanted to add an actual "Airdrop" button in the app. (Vs. a share button) – Aaron Brager Dec 03 '13 at 17:03
  • 1
    I've also run into this issue because I'm trying to share content exclusively with AirDrop – Chris Jan 03 '14 at 16:51

1 Answers1

2

There's no API that exposes this information, since UIActivityViewController won't expose the system's UIActivity objects.

Unfortunately, the only way to get this information is to check for device support.

From the Apple support website:

To share content with AirDrop, both users need one of the following devices using iOS 7:

  • iPhone 5 or later
  • iPad (4th generation)
  • iPad mini
  • iPod touch (5th generation)

AirDrop transfers information using Wi-Fi and Bluetooth. You need an iCloud account to share with Contacts.

You can detect this in a number of ways. If you don't have existing code that does this, check out the EPPZDevice class which will do most of the work for you.

Aaron Brager
  • 65,323
  • 19
  • 161
  • 287