0.0.2 • Published 6 years ago

launch-app v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

launch-app

npm version dependencies Status devDependencies Status

launch your app from web page


Install

npm install --save launch-app

Usage

import LaunchApp from 'launch-app'

const myApp = new LaunchApp({
	// your app scheme
	scheme: 'weixin://abc',
	
	// debug mode
	_debug: true,
	
	// download URL for your app
	downloadURL: {
        ios: 'https://itunes.apple.com/cn/app/qq/id444934666',
        android: 'http://im.qq.com',
        home: 'http://www.qq.com'
    },
    
    // if opening app failed, this callback will be invoked
    onFailed () {
        console.log('onFailed');
    }
});

// launch your app
myApp.start()

Support browser

  • Safari in iOS
  • QQ built-in browser
  • WeChat built-in browser

Tips

If you use it in wechat, don't forget to initialize weixinJSBridge before:

1、 Load jweixin.js:

<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>

2、Config it:

jWeixin.config({
    appId: '',
    timestamp: ,
    nonceStr: '',
    signature: ''
});

here is official documents


License

MIT License

Copyright (c) 2018 Weijia Wang

0.0.2

6 years ago

0.0.1

6 years ago