mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-05-19 19:39:54 +08:00
download-progress
This commit is contained in:
@@ -196,8 +196,8 @@ RCT_EXPORT_METHOD(applyUpdate:(NSDictionary*)updatePackage
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(downloadUpdate:(NSDictionary*)updatePackage
|
||||
resolver:(RCTPromiseResolveBlock)resolve
|
||||
rejecter:(RCTPromiseRejectBlock)reject)
|
||||
resolver:(RCTPromiseResolveBlock)resolve
|
||||
rejecter:(RCTPromiseRejectBlock)reject)
|
||||
{
|
||||
[CodePushPackage downloadPackage:updatePackage
|
||||
progressCallback:^(long expectedContentLength, long receivedContentLength) {
|
||||
|
||||
@@ -4,17 +4,6 @@
|
||||
|
||||
NSString * const StatusFile = @"codepush.json";
|
||||
|
||||
+ (CodePushPackage*)sharedInstance {
|
||||
static dispatch_once_t predicate = 0;
|
||||
__strong static id sharedInstance = nil;
|
||||
//static id sharedObject = nil; //if you're not using ARC
|
||||
dispatch_once(&predicate, ^{
|
||||
sharedInstance = [[self alloc] init];
|
||||
//sharedObject = [[[self alloc] init] retain]; // if you're not using ARC
|
||||
});
|
||||
return sharedInstance;
|
||||
}
|
||||
|
||||
+ (NSString *)getCodePushPath
|
||||
{
|
||||
return [[CodePush getDocumentsDirectory] stringByAppendingPathComponent:@"CodePush"];
|
||||
|
||||
Reference in New Issue
Block a user