镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
This repository was archived by the owner on Aug 17, 2023. It is now read-only.
This repository was archived by the owner on Aug 17, 2023. It is now read-only.

Support multiple domains #32

Closed
Closed

Description

@Ti-webdev

Using cordova-universal-links-plugin I can define more than one host:

<host name="site1.com" scheme="https" />
<host name="site2.net" scheme="https" />
<host name="site3.io" scheme="https" />

It is possible with ionic-plugin-deeplinks?

Activity

  1. smason commented on Sep 21, 2016

    @smason

    just started to look at this as well, had kind of been assuming it would just work…

    Poking into the source code it looks as though it would be a bit of work to enable. Not sure if anyone is looking into this, but I'd be interested if they did!

  2. tehfonsi commented on Sep 23, 2016

    @tehfonsi

    It would be nice if it is possible to create something like this:

               <intent-filter>
                    <action android:name="android.intent.action.VIEW" />
                    <category android:name="android.intent.category.DEFAULT" />
                    <category android:name="android.intent.category.BROWSABLE" />
                    <data android:scheme="example" />
                </intent-filter>
                <intent-filter>
                    <action android:name="android.intent.action.VIEW" />
                    <category android:name="android.intent.category.DEFAULT" />
                    <category android:name="android.intent.category.BROWSABLE" />
                    <data android:scheme="https" />
                    <data android:scheme="http" />
                    <data android:host="www.example.com" android:pathPrefix="/" />
                    <data android:host="example.com" android:pathPrefix="/" />
                </intent-filter>
    

    Which works for:

  3. smason commented on Sep 24, 2016

    @smason

    Not used cordova-universal-links-plugin, but guess their syntax would allow @tehfonsi's (which is similar to what I'd want to do as well (I'm also targeting iOS), i.e:

    <host scheme="example" />
    <host name="www.example.com" scheme="https" path="/" />
    <host name="example.com" scheme="https" path="/" />
    

    which would work for iOS by ignoring the path options as they are specified via the apple-app-site-association file, on the webserver and hence away from Ionic. Might be nice if the app association file could eventually be auto-generated!

  4. samarpanB commented on Nov 5, 2016

    @samarpanB

    Any update on this ? We are having our own ionic app. We would like to use this plugin for deep linking. But without multiple hosts, this is unusable. Can someone tell when will this be possible ?

  5. mlynch commented on Dec 7, 2016

    @mlynch
    Contributor

    I did this the old fashioned way, as I really want to avoid shipping a lot of XML parsing code like the universal links plugin does. Now, you can specify up to 5 hosts, by (optionally) setting these variables:

    1. DEEPLINK_SCHEME, DEEPLINK_HOST, and ANDROID_PATH_PREFIX
    2. DEEPLINK_SCHEME_2, DEEPLINK_HOST_2, and ANDROID_PATH_PREFIX_2
    3. DEEPLINK_SCHEME_3, DEEPLINK_HOST_3, and ANDROID_PATH_PREFIX_3
    4. DEEPLINK_SCHEME_4, DEEPLINK_HOST_4, and ANDROID_PATH_PREFIX_4
    5. DEEPLINK_SCHEME_5, DEEPLINK_HOST_5, and ANDROID_PATH_PREFIX_5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions