mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-10-08 06:55:16 +08:00
文件下载&&解压缩接口
This commit is contained in:
30
index.js
30
index.js
@@ -2,10 +2,30 @@
|
||||
* Created by tdzl2003 on 2/6/16.
|
||||
*/
|
||||
|
||||
if (__DEV__){
|
||||
if (global.__fbBatchedBridge) {
|
||||
require('fbjs/lib/warning')('Should require pushy before react-native to do hook stuff!');
|
||||
}
|
||||
//if (__DEV__){
|
||||
// if (global.__fbBatchedBridge) {
|
||||
// require('fbjs/lib/warning')('Should require pushy before react-native to do hook stuff!');
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//require('./lib/hooks');
|
||||
const HotUpdate = require('react-native').NativeModules.HotUpdate;
|
||||
const NativeAppEventEmitter = require('react-native').NativeAppEventEmitter;
|
||||
const downloadRootDir = HotUpdate.downloadRootDir;
|
||||
|
||||
export function downloadFile(options) {
|
||||
HotUpdate.downloadUpdate(options, r=>{
|
||||
//console.log(r);
|
||||
})
|
||||
}
|
||||
|
||||
require('./lib/hooks');
|
||||
export function reloadUpdate(options) {
|
||||
HotUpdate.reloadUpdate(options);
|
||||
}
|
||||
|
||||
export function setNeedUpdate(options) {
|
||||
HotUpdate.setNeedUpdate(options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user