diff --git a/Sparkle/SPUUpdater.h b/Sparkle/SPUUpdater.h index 385f91bf..2e7a42f1 100644 --- a/Sparkle/SPUUpdater.h +++ b/Sparkle/SPUUpdater.h @@ -175,7 +175,11 @@ SU_EXPORT @interface SPUUpdater : NSObject The keys of this dictionary are HTTP header fields (NSString) and values are corresponding values (NSString) */ +#if __has_feature(objc_generics) @property (nonatomic, copy, nullable) NSDictionary *httpHeaders; +#else +@property (nonatomic, copy, nullable) NSDictionary *httpHeaders; +#endif /*! A property indicating whether or not the user's system profile information is sent when checking for updates. diff --git a/Sparkle/SPUUpdaterDelegate.h b/Sparkle/SPUUpdaterDelegate.h index 25736fe2..5efa5488 100644 --- a/Sparkle/SPUUpdaterDelegate.h +++ b/Sparkle/SPUUpdaterDelegate.h @@ -91,7 +91,11 @@ typedef NS_ENUM(NSInteger, SPUUpdateCheck) \return An array of dictionaries with keys: "key", "value", "displayKey", "displayValue", the latter two being specifically for display to the user. */ +#if __has_feature(objc_generics) - (NSArray *> *)feedParametersForUpdater:(SPUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile; +#else +- (NSArray *)feedParametersForUpdater:(SPUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile; +#endif /*! Returns a custom appcast URL. diff --git a/Sparkle/SUAppcast.h b/Sparkle/SUAppcast.h index f4b2aea4..d7363d0a 100644 --- a/Sparkle/SUAppcast.h +++ b/Sparkle/SUAppcast.h @@ -22,7 +22,12 @@ NS_ASSUME_NONNULL_BEGIN SU_EXPORT @interface SUAppcast : NSObject @property (copy, nullable) NSString *userAgentString; + +#if __has_feature(objc_generics) +@property (copy, nullable) NSDictionary *httpHeaders; +#else @property (copy, nullable) NSDictionary *httpHeaders; +#endif - (void)fetchAppcastFromURL:(NSURL *)url inBackground:(BOOL)bg completionBlock:(void (^)(NSError *_Nullable))err; - (SUAppcast *)copyWithoutDeltaUpdates; diff --git a/Sparkle/SUAppcast.m b/Sparkle/SUAppcast.m index 79858b14..661bd87e 100644 --- a/Sparkle/SUAppcast.m +++ b/Sparkle/SUAppcast.m @@ -75,7 +75,7 @@ if (self.httpHeaders) { for (NSString *key in self.httpHeaders) { - id value = [self.httpHeaders objectForKey:key]; + NSString *value = [self.httpHeaders objectForKey:key]; [request setValue:value forHTTPHeaderField:key]; } } diff --git a/Sparkle/SUUpdater.h b/Sparkle/SUUpdater.h index 7ee0ffd7..d46ea615 100644 --- a/Sparkle/SUUpdater.h +++ b/Sparkle/SUUpdater.h @@ -162,7 +162,11 @@ SU_EXPORT @interface SUUpdater : NSObject The keys of this dictionary are HTTP header fields (NSString) and values are corresponding values (NSString) */ -@property (nonatomic, copy) NSDictionary *httpHeaders; +#if __has_feature(objc_generics) +@property (copy) NSDictionary *httpHeaders; +#else +@property (copy) NSDictionary *httpHeaders; +#endif /*! A property indicating whether or not the user's system profile information is sent when checking for updates. diff --git a/Sparkle/SUUpdaterDelegate.h b/Sparkle/SUUpdaterDelegate.h index 5acd5957..edbc970c 100644 --- a/Sparkle/SUUpdaterDelegate.h +++ b/Sparkle/SUUpdaterDelegate.h @@ -65,7 +65,11 @@ __deprecated_msg("See SPUUpdaterDelegate instead") \return An array of dictionaries with keys: "key", "value", "displayKey", "displayValue", the latter two being specifically for display to the user. */ +#if __has_feature(objc_generics) +- (NSArray *> *)feedParametersForUpdater:(SUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile; +#else - (NSArray *)feedParametersForUpdater:(SUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile; +#endif /*! Returns a custom appcast URL.