diff --git a/Sparkle/SUAppcast.m b/Sparkle/SUAppcast.m index 86c014b4..d5dfd70f 100644 --- a/Sparkle/SUAppcast.m +++ b/Sparkle/SUAppcast.m @@ -167,7 +167,7 @@ if ([[child name] isEqualToString:@"enclosure"]) [deltas addObject:[(NSXMLElement *)child attributesAsDictionary]]; } - dict[@"deltas"] = deltas; + dict[name] = deltas; } else if ([name isEqualToString:SUAppcastTagsKey]) { NSMutableArray *tags = [NSMutableArray array]; diff --git a/Sparkle/SUAppcastItem.m b/Sparkle/SUAppcastItem.m index 9c24aec3..8dfa3de7 100644 --- a/Sparkle/SUAppcastItem.m +++ b/Sparkle/SUAppcastItem.m @@ -160,12 +160,12 @@ self.releaseNotesURL = nil; } - if (dict[@"deltas"]) { + NSArray *deltaDictionaries = dict[SUAppcastDeltasKey]; + if (deltaDictionaries) { NSMutableDictionary *deltas = [NSMutableDictionary dictionary]; - NSArray *deltaDictionaries = dict[@"deltas"]; for (NSDictionary *deltaDictionary in deltaDictionaries) { NSMutableDictionary *fakeAppCastDict = [dict mutableCopy]; - [fakeAppCastDict removeObjectForKey:@"deltas"]; + [fakeAppCastDict removeObjectForKey:SUAppcastDeltasKey]; fakeAppCastDict[@"enclosure"] = deltaDictionary; SUAppcastItem *deltaItem = [[[self class] alloc] initWithDictionary:fakeAppCastDict];