Search code examples
iosswiftuikitairdropuiactivitycontroller

How to programmatically trigger AirDrop with list of available devices


I have implemented UIActivityController with AirDrop action only according this thread: https://stackoverflow.com/a/54185547/13406256 and trigger it on needed place. However, is there a way how to go one level "deeper" and trigger directly the list of available devices I can share via AirDrop with (and skip UIActivityController)?

Please see the image example below.

  1. On the left is current situation - UIActivityController
  2. On the right, is "required" situation - have directly opened list of AirDrop available devices

enter image description here


Solution

  • As far I studied, there is no way how to trigger it programmatically.

    Also, what more I was interested in. Sharing dialog cannot be customised in a way where you would show only one item/service in the sharing dialog. For example, if you would like to offer sharing to WhatsApp only, it's not possible. But there is work around for doing with AirDrop only, as stated here: https://stackoverflow.com/a/36573915/13406256