@qudian_mobile/qd-react-native-upgrade-tools

0.1.2 • Public • Published

qd-react-native-upgrade-tools

tools for native upgrade

Getting started

$ npm install @qudian_mobile/qd-react-native-upgrade-tools --save

react-native link react-native-device-info
react-native link prop-types
react-native link @remobile/react-native-toast
react-native link @qudian_mobile/qd-react-native-tool-kit

Usage

import UpgradeHelper from '@qudian_mobile/qd-react-native-upgrade-tools';

_checkUpdates() {
        new UpgradeHelper().checkUpdates(() => {
            return new Promise((resolve, reject) => {
          				// maybe resolve from your network fetch
                        resolve({
                            has_new: true,
                            version: '1.1.1',
                            force_update: false,
                            url: '',
                            message: '',
                        });
                })
            })
        })
    }
}

// 如果是手动检查,在调用checkUpdates方法时加第二个参数true

Readme

Keywords

Package Sidebar

Install

npm i @qudian_mobile/qd-react-native-upgrade-tools

Weekly Downloads

0

Version

0.1.2

License

MIT

Unpacked Size

6.96 kB

Total Files

4

Last publish

Collaborators

  • yanghailong
  • liuxianhe
  • xfjtmsm
  • linzehua
  • liujunrong
  • yangjun
  • wushenghua
  • phoobobo
  • mobile_master