1

I am developing an iOS app which generates a PDF. I want to share and open that pdf using my app. I tried to use the : https://developer.apple.com/library/ios/samplecode/DocInteraction/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010052 sample app. But, except mail and print, its not giving any other app to open it up with even though whatsapp is installed.

So how exactly to use DocInteractionController to share files using whatsapp? I followed : https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/PreviewingandOpeningItems.html#//apple_ref/doc/uid/TP40010410-SW1 and https://www.whatsapp.com/faq/iphone/23559013.

Thanks

MTM
  • 919
  • 10
  • 22
Smitha
  • 6,110
  • 24
  • 90
  • 161
  • So do you want to open a PDF using whatsapp or simply open a PDF in one of your Views ? – Dhrumil Jun 30 '14 at 07:30
  • Use `UIWebView` if you want to just open in your application, and if you want to `Open With` some other apps, follow this link http://www.g8production.com/post/54417573525/open-with-in-ios-uidocumentinteractioncontroller – iphonic Jun 30 '14 at 07:36
  • I want to open it using whatsapp and share the file using whatsapp – Smitha Jun 30 '14 at 07:39
  • 1
    I am sorry, but I don't think whatsapp support PDF file to share it only support, video, images, locations, contacts etc. – iphonic Jun 30 '14 at 07:49
  • Ok then. How can i share videos or images? – Smitha Jun 30 '14 at 08:32

1 Answers1

3

Thanks a lot @iphonic.

Whatsapp supports only images, videos not pdf or text file.

So we can use http://www.g8production.com/post/54417573525/open-with-in-ios-uidocumentinteractioncontroller for those types and leave the rest!

Smitha
  • 6,110
  • 24
  • 90
  • 161