1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

bug fixed

This commit is contained in:
lvbingru 2016-04-05 17:58:12 +08:00
parent 834dee1e8b
commit 818395383a

View File

@ -106,12 +106,13 @@ RCT_EXPORT_MODULE(RCTHotUpdate);
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSMutableDictionary *packageInfo = [[defaults dictionaryForKey:rnHotUpdatePackageInfoKey] mutableCopy];
NSDictionary *ret = @{ @"downloadRootDir": [RCTHotUpdate downloadDir],
@"packageVersion": [infoDictionary objectForKey:@"CFBundleShortVersionString"],
@"currentVersion": [packageInfo objectForKey:paramCurrentVersion],
@"isFirstTime": [packageInfo objectForKey:paramIsFirstTime],
@"isRolledBack": [packageInfo objectForKey:paramIsRolledBack]
};
NSMutableDictionary *ret = [@{} mutableCopy];
ret[@"downloadRootDir"] = [RCTHotUpdate downloadDir];
ret[@"packageVersion"] = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
ret[@"currentVersion"] = [packageInfo objectForKey:paramCurrentVersion];
ret[@"isFirstTime"] = [packageInfo objectForKey:paramIsFirstTime];
ret[@"isRolledBack"] = [packageInfo objectForKey:paramIsRolledBack];
if (packageInfo) {
// clear isFirstTime and isRolledBack
packageInfo[paramIsFirstTime] = @(NO);