From 7347631d34cdb0b2bc91186fc18616f4c2f5e69c Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Mon, 27 Jul 2015 10:47:09 -0700 Subject: [PATCH] Don't pollute headers with version checks. --- Sparkle/SUUpdateAlert.h | 14 ++------------ Sparkle/SUUpdateAlert.m | 11 ++++++++++- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Sparkle/SUUpdateAlert.h b/Sparkle/SUUpdateAlert.h index fa643c81..999afd5e 100644 --- a/Sparkle/SUUpdateAlert.h +++ b/Sparkle/SUUpdateAlert.h @@ -9,19 +9,9 @@ #ifndef SUUPDATEALERT_H #define SUUPDATEALERT_H -#import #import "SUWindowController.h" #import "SUVersionDisplayProtocol.h" -// WebKit protocols are not explicitly declared until 10.11 SDK, so -// declare dummy protocols to keep the build working on earlier SDKs. -#if !defined(MAC_OS_X_VERSION_10_11) -@protocol WebFrameLoadDelegate -@end -@protocol WebPolicyDelegate -@end -#endif - @protocol SUUpdateAlertDelegate; typedef NS_ENUM(NSInteger, SUUpdateAlertChoice) { @@ -31,8 +21,8 @@ typedef NS_ENUM(NSInteger, SUUpdateAlertChoice) { SUOpenInfoURLChoice }; -@class WebView, SUAppcastItem, SUHost; -@interface SUUpdateAlert : SUWindowController +@class SUAppcastItem, SUHost; +@interface SUUpdateAlert : SUWindowController @property (weak) id versionDisplayer; diff --git a/Sparkle/SUUpdateAlert.m b/Sparkle/SUUpdateAlert.m index bd1ebf0d..6338956d 100644 --- a/Sparkle/SUUpdateAlert.m +++ b/Sparkle/SUUpdateAlert.m @@ -17,7 +17,16 @@ #import "SUConstants.h" -@interface SUUpdateAlert () +// WebKit protocols are not explicitly declared until 10.11 SDK, so +// declare dummy protocols to keep the build working on earlier SDKs. +#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101100 +@protocol WebFrameLoadDelegate +@end +@protocol WebPolicyDelegate +@end +#endif + +@interface SUUpdateAlert () @property (strong) SUAppcastItem *updateItem; @property (strong) SUHost *host;