upgrade to RN 0.19

This commit is contained in:
Geoffrey Goh
2016-02-01 17:29:17 -08:00
parent 9d9b664884
commit 98d12f494a
11 changed files with 358 additions and 137 deletions

View File

@@ -384,14 +384,14 @@ RCT_EXPORT_METHOD(downloadUpdate:(NSDictionary*)updatePackage
NSDictionary *newPackage = [CodePushPackage getPackage:updatePackage[PackageHashKey] error:&err];
if (err) {
return reject(err);
return reject([NSString stringWithFormat: @"%lu", (long)err.code], err.localizedDescription, err);
}
resolve(newPackage);
}
// The download failed
failCallback:^(NSError *err) {
reject(err);
reject([NSString stringWithFormat: @"%lu", (long)err.code], err.localizedDescription, err);
}];
});
}
@@ -419,7 +419,7 @@ RCT_EXPORT_METHOD(getCurrentPackage:(RCTPromiseResolveBlock)resolve
NSMutableDictionary *package = [[CodePushPackage getCurrentPackage:&error] mutableCopy];
if (error) {
reject(error);
reject([NSString stringWithFormat: @"%lu", (long)error.code], error.localizedDescription, error);
}
// Add the "isPending" virtual property to the package at this point, so that
@@ -445,7 +445,7 @@ RCT_EXPORT_METHOD(installUpdate:(NSDictionary*)updatePackage
error:&error];
if (error) {
reject(error);
reject([NSString stringWithFormat: @"%lu", (long)error.code], error.localizedDescription, error);
} else {
[self savePendingUpdate:updatePackage[PackageHashKey]
isLoading:NO];