user10877689
user10877689

Reputation: 11

How to keep only the airdrop option in the UIActivityViewController?

In my application I want to bring out the share sheet with the Airdrop as the only option.

I saw the answer to a question similar to it.: Share via Airdrop only But it doesn't work.

func activityViewControllerPlaceholderItem(activityViewController: UIActivityViewController) -> AnyObject {
    /// Use an empty URL as placeholder to let iOS Share Sheet show the AirDrop only.
    return NSURL(string: "")!
}

func activityViewController(activityViewController: UIActivityViewController, itemForActivityType activityType: String) -> AnyObject? {
    return item
}   

I want to bring out the share sheet with the Airdrop as the only option.

enter image description here

Upvotes: 1

Views: 610

Answers (0)

Related Questions