DEEPLINK_HOST in ionic deeplink

2019-08-31 16:42发布

问题:

I am trying to set up my app to have deeplinks.

As mentioend in the ionic native docs here we need to use the following command

ionic cordova plugin add ionic-plugin-deeplinks --variable URL_SCHEME=myapp --variable DEEPLINK_SCHEME=https --variable DEEPLINK_HOST=example.com --variable ANDROID_PATH_PREFIX=/

What should I enter in the DEEPLINK_HOST parameter.

If I provide it my site domain will I have to setup anything on that site?

回答1:

DEEPLINK_HOST is the host part of the URL you click on mobile and your app will be opened instead of the browser. It can be any hostname, but your website hostname (if exists) is the best as you can use the same URLs for desktop and mobile users.

For Android app you do not need to add/change anything on the website. In case of iOS just follow the documentation of Universal Links.