1.0.6 • Published 2 years ago

app-deep-link-ss v1.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

https://img.shields.io/npm/v/app-deep-link/latest.svg https://img.shields.io/badge/%24-donate-ff69b4.svg

When a clicked link or programmatic request invokes a web URI intent, the mobile system tries open the only available app that can handle the URI. If open the app fails, navigate to download it.

You needn't consider what platform is Android or iOS. You don't even need to consider what browser it is.

Call the only method AppDeepLink.wakeUpOrInstall when you want to wake up your app or install it in your js.

$ npm install -S app-deep-link
const AppDeepLink = require('AppDeepLink');

...
AppDeepLink.wakeUpOrInstall({
    ios: {
        ulink: 'https://your.universal.link',

        scheme: 'yourscheme://your.scheme',

        downloadUrl: 'https://your.download.url'
        // itms-apps://itunes.apple.com/app/id
        // itms-appss://apps.apple.com/app/id
        // https://apps.apple.com/app/id
        // https://baidu.com/app.plist
    },
    android: {
        scheme: 'yourscheme://your.scheme', 

        downloadUrl: 'https://baidu.com/your_app.apk'
    }
});
...
<script src="../dist/app_deep_link.js"></script>
...

AppDeepLink.wakeUpOrInstall({
    ios: {
        ulink: 'https://your.universal.link',

        scheme: 'yourscheme://your.scheme',

        downloadUrl: 'https://your.download.url'
        // itms-apps://itunes.apple.com/app/id
        // itms-appss://apps.apple.com/app/id
        // https://apps.apple.com/app/id
        // https://baidu.com/app.plist
    },
    android: {
        scheme: 'yourscheme://your.scheme', 

        downloadUrl: 'https://baidu.com/your_app.apk'
    }
});
...
$ npm run build

If you find this project useful, you can buy anthor a glass of juice. Thank you.

Donate

Paypal Me

For help and support questions, please mail to me. (huzhenjie.dev@gmail.com)

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago