mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-27 05:04:27 +00:00
Sparkle's past behavior was sorting appcast items by published dates and picking the first compatible item. However, it makes more sense to pick the compatible item with the highest version (see issue #31). The NSDate instance creation & sorting has also been removed from the code. The methods we were using to parse the string into a NSDate have been deprecated, and are strongly discouraged. Namely, all methods taking an arbitrary/natural string have been nuked signaling they were probably a really bad idea. Furthermore, the date code we had created a NSCalendarDate which has been long deprecated. So we just don't handle date parsing. Even if there is a proper format for the pubDate, It is an extra burden on the developer to insert a conforming date. And we shouldn't want to rely on a potentially error-prone input field.
45 lines
1.5 KiB
Objective-C
45 lines
1.5 KiB
Objective-C
//
|
|
// SUAppcastItem.h
|
|
// Sparkle
|
|
//
|
|
// Created by Andy Matuschak on 3/12/06.
|
|
// Copyright 2006 Andy Matuschak. All rights reserved.
|
|
//
|
|
|
|
#ifndef SUAPPCASTITEM_H
|
|
#define SUAPPCASTITEM_H
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import "SUExport.h"
|
|
|
|
SU_EXPORT @interface SUAppcastItem : NSObject
|
|
@property (copy, readonly) NSString *title;
|
|
@property (copy, readonly) NSString *dateString;
|
|
@property (copy, readonly) NSString *itemDescription;
|
|
@property (strong, readonly) NSURL *releaseNotesURL;
|
|
@property (copy, readonly) NSString *DSASignature;
|
|
@property (copy, readonly) NSString *minimumSystemVersion;
|
|
@property (copy, readonly) NSString *maximumSystemVersion;
|
|
@property (strong, readonly) NSURL *fileURL;
|
|
@property (copy, readonly) NSString *versionString;
|
|
@property (copy, readonly) NSString *displayVersionString;
|
|
@property (copy, readonly) NSDictionary *deltaUpdates;
|
|
@property (strong, readonly) NSURL *infoURL;
|
|
|
|
// Initializes with data from a dictionary provided by the RSS class.
|
|
- (instancetype)initWithDictionary:(NSDictionary *)dict;
|
|
- (instancetype)initWithDictionary:(NSDictionary *)dict failureReason:(NSString **)error;
|
|
|
|
@property (getter=isDeltaUpdate, readonly) BOOL deltaUpdate;
|
|
@property (getter=isCriticalUpdate, readonly) BOOL criticalUpdate;
|
|
@property (getter=isInformationOnlyUpdate, readonly) BOOL informationOnlyUpdate;
|
|
|
|
// Returns the dictionary provided in initWithDictionary; this might be useful later for extensions.
|
|
@property (readonly, copy) NSDictionary *propertiesDictionary;
|
|
|
|
- (NSURL *)infoURL;
|
|
|
|
@end
|
|
|
|
#endif
|