mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Parse and serialize osString appcast item property
This commit is contained in:
1 parent
c03cc0fa17
commit
154b702552
1 file changed
+6
Vendored
+6
@@ -79,6 +79,7 @@ static NSString *SUAppcastItemInstallationTypeKey = @"SUAppcastItemInstallationT
|
||||
_releaseNotesURL = [decoder decodeObjectOfClass:[NSURL class] forKey:SUAppcastItemReleaseNotesURLKey];
|
||||
_title = [(NSString *)[decoder decodeObjectOfClass:[NSString class] forKey:SUAppcastItemTitleKey] copy];
|
||||
_versionString = [(NSString *)[decoder decodeObjectOfClass:[NSString class] forKey:SUAppcastItemVersionStringKey] copy];
|
||||
_osString = [(NSString *)[decoder decodeObjectOfClass:[NSString class] forKey:SUAppcastAttributeOsType] copy];
|
||||
_propertiesDictionary = [decoder decodeObjectOfClasses:[NSSet setWithArray:@[[NSDictionary class], [NSString class], [NSDate class], [NSArray class]]] forKey:SUAppcastItemPropertiesKey];
|
||||
}
|
||||
|
||||
@@ -133,6 +134,10 @@ static NSString *SUAppcastItemInstallationTypeKey = @"SUAppcastItemInstallationT
|
||||
[encoder encodeObject:self.versionString forKey:SUAppcastItemVersionStringKey];
|
||||
}
|
||||
|
||||
if (self.osString != nil) {
|
||||
[encoder encodeObject:self.osString forKey:SUAppcastAttributeOsType];
|
||||
}
|
||||
|
||||
if (self.propertiesDictionary != nil) {
|
||||
[encoder encodeObject:self.propertiesDictionary forKey:SUAppcastItemPropertiesKey];
|
||||
}
|
||||
@@ -257,6 +262,7 @@ static NSString *SUAppcastItemInstallationTypeKey = @"SUAppcastItemInstallationT
|
||||
}
|
||||
if (enclosure) {
|
||||
_signatures = [[SUSignatures alloc] initWithDsa:[enclosure objectForKey:SUAppcastAttributeDSASignature] ed:[enclosure objectForKey:SUAppcastAttributeEDSignature]];
|
||||
_osString = [enclosure objectForKey:SUAppcastAttributeOsType];
|
||||
}
|
||||
|
||||
_versionString = [(NSString *)newVersion copy];
|
||||
|
||||
Reference in new issue
Block a user