Skip to content
프로젝트

소개

모바일 웹사이트 사용자를 네이티브 iOS 및/또는 Android 앱으로 리디렉션합니다

웹 및 앱 개발

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
-1
in 15 days
-1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

browser-deeplink

‼️ Not maintained - Use at own risk

Redirect your website users to your native Android and/or iOS app. If the user does not have the app, they are redirected to the corresponding app store page.

Such functionality is very common for apps like YouTube, Spotify etc. But it is not default functionality in mobile browsers today, and unnecessarily hard to implement. This plugin uses a workaround with a hidden iframe and setTimeout().

How to use

1. Include browser-deeplink on your site.

<script src="browser-deeplink.js" type="text/javascript"></script>

or

require("./browser-deeplink");

2. Provide your app details

deeplink.setup({
    iOS: {
        appName: "myapp",
        appId: "123456789",
    },
    android: {
        appId: "com.myapp.android"
    }
});

This will create the following fallback app store links:

iOS: itms-apps://itunes.apple.com/app/myapp/id123456789?mt=8
Android: https://play.google.com/store/apps/details?id=com.myapp.android

Options

Optionally, you can specify a iOS.storeUrl or android.storeUrl to override the fallback redirect.

deeplink.setup({
    iOS: {
        storeUrl: "http://...",
    }
});

You can also skip the app store fallback altogether if you want by specifying fallback: false

deeplink.setup({
    fallback: false
});

In case you want to register your android app on your http(s) links directly you can disable deeplinking for android by specifying androidDisabled: true

deeplink.setup({
    androidDisabled: true
});

3. Open your deeplinks!

window.onload = function() {
    deeplink.open("myapp://object/xyz");
}

License

This library is released under the MIT licence.

관련 프로젝트 살펴보기

불러오는 중…