Ios – Receive URL in Ionic for ios


I am using ionic framework. I'm trying to set up a way to receive a url from another app. Like, you are in browser, click share, and send the link to another app (my app). I found this cordova plugin, and have integrated it in my app. But this is pulgin for Android. I need same functionality in IOS.

Any idea which plugin i need to use for ios

Steps taken by me for Android

1) cordova plugin add git://
2) Checked config.xml file and found code for webintent

    <action android:name="android.intent.action.SEND" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:mimeType="text/plain" />

And app.js code

if (window.plugins && window.plugins.webintent) {
  window.plugins.webintent.getUri(function(url) {
    alert("getUri url:"+url);

Any suggestions for the same functionally in ios ?

Thank you

Best Solution

All you need is Custom-URL-scheme cordova plugin.

You can do it manually also. For iOS add to your *.plist. Or You can look at Step 5


In iOS after adding custom scheme it automatically calls a function called handleOpenURL.

For android add AndroidManifest:(In android you can even listen http scheme)

<activity android:label="@string/app_name" android:name="">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="http" android:host="" android:pathPrefix="/" />
        <data android:scheme="https" android:host="" android:pathPrefix="/" />