I\'m already able to share photos to Whatsapp but the way I do this is by providing Whatsapp option in a UIActivityViewController and then showing a UIDoc
Well, if I understand the question in a proper way, there is an option to share it easily via 1 UIDocumentInteractionController, please review my old question & answer: https://stackoverflow.com/a/20887254/849616.
So basically, you want to share an image via Facebook or Whatsapp, plus provide an option to save the image.
Well... Lets break this down slowly for the 2 quickest ways.
UIActivityViewControllerIf you share image via UIActivityViewController then in order to provide Whatsapp option, you'll need to create a custom UIActivity (See Stackoverflow Question).
The problems with this are:
UIDocumentInteractionControllerIf you share image via UIDocumentInteractionController then in order to provide the Facebook option, you'll need to specify the UTI as public.image.
The problems with this are:
public.image UTI will populate your UIDocumentInteractionController with alot more options than just Facebook and Whatsapp.Save option, rather than
-presentOpenInMenuFromRect:inView:animated: method that displays only apps that open this file type...-presentOptionsMenuFromRect:inView:animated: method in order to show the option Save to Album. But this will include other options such as Mail etc.If you use only UIDocumentInteractionController then you should accept the fact that you cannot show just Facebook + Whatsapp + Save (due to the reasons mentioned above)
If you use UIActivityViewController and don't want to create a custom UIActivity for Whatsapp, then you're stuck but... if you decide to use a custom UIActivity then you're still stuck because there's no provision to share an image object with Whatsapp using UIActivityViewController.
There doesn't seem to be any easy way to have just Facebook + Whatsapp + Save option.
The thing that complicates it is Whatsapp which forces you to use UIDocumentInteractionController which seems like the only way to share an image on Whatsapp (currently) and due to it's limited URL scheme, there's no point providing it in UIActivityViewController.
Furthermore, using UIDocumentInteractionController in turns leads you to provide more options than you would want.
Honestly, this looks pretty bleak right now.