download-progress

This commit is contained in:
Geoffrey Goh
2015-11-12 20:41:36 -08:00
parent f553fa83d4
commit e79b911e46
2 changed files with 2 additions and 13 deletions

View File

@@ -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) {

View File

@@ -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"];