Skip to content

Commit

Permalink
Update sparkle framework, fixes issues with updates
Browse files Browse the repository at this point in the history
  • Loading branch information
gcollazo committed Feb 27, 2018
1 parent cd7e3fa commit cf300ce
Show file tree
Hide file tree
Showing 162 changed files with 635 additions and 276 deletions.
1 change: 1 addition & 0 deletions Frameworks/Sparkle.framework/PrivateHeaders
29 changes: 18 additions & 11 deletions Frameworks/Sparkle.framework/Versions/A/Headers/SUAppcast.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,32 @@
#ifndef SUAPPCAST_H
#define SUAPPCAST_H

#import <Foundation/NSURLDownload.h>
#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
#import "SUExport.h"

@protocol SUAppcastDelegate;
NS_ASSUME_NONNULL_BEGIN

@class SUAppcastItem;
SU_EXPORT @interface SUAppcast : NSObject <NSURLDownloadDelegate>
SU_EXPORT @interface SUAppcast : NSObject<NSURLDownloadDelegate>

@property (copy, nullable) NSString *userAgentString;

@property (weak) id<SUAppcastDelegate> delegate;
@property (copy) NSString *userAgentString;
#if __has_feature(objc_generics)
@property (copy, nullable) NSDictionary<NSString *, NSString *> *httpHeaders;
#else
@property (copy, nullable) NSDictionary *httpHeaders;
#endif

- (void)fetchAppcastFromURL:(NSURL *)url;
- (void)fetchAppcastFromURL:(NSURL *)url inBackground:(BOOL)bg completionBlock:(void (^)(NSError *_Nullable))err;
- (SUAppcast *)copyWithoutDeltaUpdates;

@property (readonly, copy) NSArray *items;
@property (readonly, copy, nullable) NSArray *items;
@end

@protocol SUAppcastDelegate <NSObject>
- (void)appcastDidFinishLoading:(SUAppcast *)appcast;
- (void)appcast:(SUAppcast *)appcast failedToLoadWithError:(NSError *)error;
@end
NS_ASSUME_NONNULL_END

#endif
13 changes: 11 additions & 2 deletions Frameworks/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,25 @@
#ifndef SUAPPCASTITEM_H
#define SUAPPCASTITEM_H

#include "SUExport.h"
#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
#import "SUExport.h"

SU_EXPORT @interface SUAppcastItem : NSObject
@property (copy, readonly) NSString *title;
@property (copy, readonly) NSDate *date;
@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 (nonatomic, readonly) uint64_t contentLength;
@property (copy, readonly) NSString *versionString;
@property (copy, readonly) NSString *osString;
@property (copy, readonly) NSString *displayVersionString;
@property (copy, readonly) NSDictionary *deltaUpdates;
@property (strong, readonly) NSURL *infoURL;
Expand All @@ -31,6 +38,8 @@ SU_EXPORT @interface SUAppcastItem : NSObject

@property (getter=isDeltaUpdate, readonly) BOOL deltaUpdate;
@property (getter=isCriticalUpdate, readonly) BOOL criticalUpdate;
@property (getter=isMacOsUpdate, readonly) BOOL macOsUpdate;
@property (getter=isInformationOnlyUpdate, readonly) BOOL informationOnlyUpdate;

// Returns the dictionary provided in initWithDictionary; this might be useful later for extensions.
@property (readonly, copy) NSDictionary *propertiesDictionary;
Expand Down
17 changes: 13 additions & 4 deletions Frameworks/Sparkle.framework/Versions/A/Headers/SUErrors.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
#ifndef SUERRORS_H
#define SUERRORS_H

#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
#import "SUExport.h"

/**
Expand All @@ -23,10 +27,11 @@ typedef NS_ENUM(OSStatus, SUError) {
SUNoUpdateError = 1001,
SUAppcastError = 1002,
SURunningFromDiskImageError = 1003,
// Downlaod phase errors.

// Download phase errors.
SUTemporaryDirectoryError = 2000,

SUDownloadError = 2001,

// Extraction phase errors.
SUUnarchivingError = 3000,
SUSignatureError = 3001,
Expand All @@ -38,7 +43,11 @@ typedef NS_ENUM(OSStatus, SUError) {
SUMissingInstallerToolError = 4003,
SURelaunchError = 4004,
SUInstallationError = 4005,
SUDowngradeError = 4006
SUDowngradeError = 4006,
SUInstallationCancelledError = 4007,

// System phase errors
SUSystemPowerOffError = 5000
};

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@
#ifndef SUSTANDARDVERSIONCOMPARATOR_H
#define SUSTANDARDVERSIONCOMPARATOR_H

#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
#import "SUExport.h"
#import "SUVersionComparisonProtocol.h"

NS_ASSUME_NONNULL_BEGIN

/*!
Sparkle's default version comparator.
Expand All @@ -21,8 +28,15 @@
*/
SU_EXPORT @interface SUStandardVersionComparator : NSObject <SUVersionComparison>

/*!
Initializes a new instance of the standard version comparator.
*/
- (instancetype)init;

/*!
Returns a singleton instance of the comparator.
It is usually preferred to alloc/init new a comparator instead.
*/
+ (SUStandardVersionComparator *)defaultComparator;

Expand All @@ -34,4 +48,5 @@ SU_EXPORT @interface SUStandardVersionComparator : NSObject <SUVersionComparison
- (NSComparisonResult)compareVersion:(NSString *)versionA toVersion:(NSString *)versionB;
@end

NS_ASSUME_NONNULL_END
#endif
Loading

0 comments on commit cf300ce

Please sign in to comment.