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]; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSMutableDictionary *packageInfo = [[defaults dictionaryForKey:rnHotUpdatePackageInfoKey] mutableCopy]; NSMutableDictionary *packageInfo = [[defaults dictionaryForKey:rnHotUpdatePackageInfoKey] mutableCopy];
NSDictionary *ret = @{ @"downloadRootDir": [RCTHotUpdate downloadDir], NSMutableDictionary *ret = [@{} mutableCopy];
@"packageVersion": [infoDictionary objectForKey:@"CFBundleShortVersionString"], ret[@"downloadRootDir"] = [RCTHotUpdate downloadDir];
@"currentVersion": [packageInfo objectForKey:paramCurrentVersion], ret[@"packageVersion"] = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
@"isFirstTime": [packageInfo objectForKey:paramIsFirstTime], ret[@"currentVersion"] = [packageInfo objectForKey:paramCurrentVersion];
@"isRolledBack": [packageInfo objectForKey:paramIsRolledBack] ret[@"isFirstTime"] = [packageInfo objectForKey:paramIsFirstTime];
}; ret[@"isRolledBack"] = [packageInfo objectForKey:paramIsRolledBack];
if (packageInfo) { if (packageInfo) {
// clear isFirstTime and isRolledBack // clear isFirstTime and isRolledBack
packageInfo[paramIsFirstTime] = @(NO); packageInfo[paramIsFirstTime] = @(NO);