0

I want to share video file via only built-in iOS apps.

And I want third-party apps hide from UIActivityViewController's list.


I Found this answer https://stackoverflow.com/a/54185547/10283519
This answer makes it possible share only AirDrop.


How to add built-in iOS apps? (eg: PhotosFiles, Mail...)

oddK
  • 261
  • 4
  • 14

1 Answers1

0

You can not add option menually, it will display automatically according to share content, for example, if share content is only text then not show "iCloud photo sharing" But share content has the image then automatically show option accordingly.

If you want to hide/remove options from UIActivityViewController then you can do this using excludedActivityTypes property of UIActivityViewController, See following code for this.

let activityController = UIActivityViewController(activityItems: sharingItems, applicationActivities: nil)
        activityController.excludedActivityTypes = [.print, .mail, .airDrop, .assignToContact, .copyToPasteboard, .addToReadingList, .markupAsPDF, .message, .openInIBooks, .postToTwitter, .postToFacebook]
        present(activityController, animated: true, completion: nil)
AtulParmar
  • 4,358
  • 1
  • 24
  • 45