0

I want to share a link from my app using other applications installed on my iPhone such as Gmail, Facebook, DropBox, WhatsApp etc. In android there is a straight way to do so, just fire an intent and it automatically shows the installed apps through which we can share whatever we want. Is there any such way in iPhone ?

Thanks!

bdesham
  • 15,430
  • 13
  • 79
  • 123
Vipul J
  • 6,641
  • 9
  • 46
  • 61
  • 1
    how o? how to? Please correct the typo in title – Bob Cromwell May 22 '13 at 12:53
  • I don't quite understand what you want. You want a link that goes *from* your app *to* e.g. Facebook, or the other way around? – bdesham May 22 '13 at 13:03
  • possible duplicate of [How to display the default iOS 6 share action sheet with available share options?](http://stackoverflow.com/questions/13498459/how-to-display-the-default-ios-6-share-action-sheet-with-available-share-options) – Marcus Adams May 22 '13 at 13:04
  • You cannot share stuff on watsapp because whatsapp does not have any public API you can use. – Ushan87 May 22 '13 at 13:06

1 Answers1

4

On iOS , app is more separated from each other. The only way to pass data from one app to other is using the URL mechanism. As one example, an app register url scheme "open-me://",you invoked openURL with "open-me://my-link" then that app will launched. That app will define the detail of the URL so it could understand the content.Continue with the example we are using, the text you passed could be either "open-me://A?data=my-link" or "open-me://A?message=my-link". So there are no general solution for all apps.Typically third party app will provide a SDK to make these things easy.

If you don't mind using a kind of large third party library, ShareKit is a good choice. It supports quite some apps.

If you want to know more about this topic,for example sharing files between app. You could start from reading the class reference of UIDocumentInteractionController.This UI component will show a list of app installed on your device which support the URL scheme.

Bob Cromwell
  • 445
  • 2
  • 14