diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index 26c269c9..7c47c62c 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -265,8 +265,8 @@ A5BF4F1D1BC7668B007A052A /* SUTestWebServer.m in Sources */ = {isa = PBXBuildFile; fileRef = A5BF4F1C1BC7668B007A052A /* SUTestWebServer.m */; }; C23E885B1BE7B24F0050BB73 /* SparkleTestCodeSignApp.enc.dmg in Resources */ = {isa = PBXBuildFile; fileRef = C23E88591BE7AF890050BB73 /* SparkleTestCodeSignApp.enc.dmg */; }; E1545EC51E1D7E0200FAECE8 /* SUTouchBarButtonGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = E1545EC31E1D7E0200FAECE8 /* SUTouchBarButtonGroup.h */; }; - E1545EC61E1D7E0200FAECE8 /* SUTouchBarButtonGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = E1545EC41E1D7E0200FAECE8 /* SUTouchBarButtonGroup.m */; settings = {COMPILER_FLAGS = "-Wno-partial-availability"; }; }; - E1EC2A301E21667000245715 /* SUTouchBarButtonGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = E1545EC41E1D7E0200FAECE8 /* SUTouchBarButtonGroup.m */; settings = {COMPILER_FLAGS = "-Wno-partial-availability"; }; }; + E1545EC61E1D7E0200FAECE8 /* SUTouchBarButtonGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = E1545EC41E1D7E0200FAECE8 /* SUTouchBarButtonGroup.m */; }; + E1EC2A301E21667000245715 /* SUTouchBarButtonGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = E1545EC41E1D7E0200FAECE8 /* SUTouchBarButtonGroup.m */; }; F8761EB11ADC5068000C9034 /* SUCodeSigningVerifierTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F8761EB01ADC5068000C9034 /* SUCodeSigningVerifierTest.m */; }; F8761EB31ADC50EB000C9034 /* SparkleTestCodeSignApp.zip in Resources */ = {isa = PBXBuildFile; fileRef = F8761EB21ADC50EB000C9034 /* SparkleTestCodeSignApp.zip */; }; F8761EB61ADC5E7A000C9034 /* SUCodeSigningVerifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 61B078CD15A5FB6100600039 /* SUCodeSigningVerifier.m */; }; @@ -739,6 +739,7 @@ 7205C4351E12CA7000E370AE /* ConfigGenerateAppcastDebug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigGenerateAppcastDebug.xcconfig; sourceTree = ""; }; 720767CD1E2DC37400F9A850 /* TerminationListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TerminationListener.h; sourceTree = ""; }; 720767CE1E2DC37400F9A850 /* TerminationListener.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TerminationListener.m; sourceTree = ""; }; + 720767D01E2E3DD300F9A850 /* AppKitPrevention.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppKitPrevention.h; sourceTree = ""; }; 720B16421C66433D006985FB /* UITests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "UITests-Info.plist"; path = "UITests/UITests-Info.plist"; sourceTree = SOURCE_ROOT; }; 720B16431C66433D006985FB /* SUTestApplicationTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SUTestApplicationTest.swift; path = UITests/SUTestApplicationTest.swift; sourceTree = SOURCE_ROOT; }; 7210C7671B9A9A1500EB90AC /* SUUnarchiverTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SUUnarchiverTest.swift; sourceTree = ""; }; @@ -803,6 +804,7 @@ C23E88591BE7AF890050BB73 /* SparkleTestCodeSignApp.enc.dmg */ = {isa = PBXFileReference; lastKnownFileType = file; path = SparkleTestCodeSignApp.enc.dmg; sourceTree = ""; }; E1545EC31E1D7E0200FAECE8 /* SUTouchBarButtonGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUTouchBarButtonGroup.h; sourceTree = ""; }; E1545EC41E1D7E0200FAECE8 /* SUTouchBarButtonGroup.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUTouchBarButtonGroup.m; sourceTree = ""; }; + E19CA4901E2E7E4D009D4D18 /* SUTouchBarForwardDeclarations.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SUTouchBarForwardDeclarations.h; sourceTree = ""; }; F8761EB01ADC5068000C9034 /* SUCodeSigningVerifierTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUCodeSigningVerifierTest.m; sourceTree = ""; }; F8761EB21ADC50EB000C9034 /* SparkleTestCodeSignApp.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = SparkleTestCodeSignApp.zip; sourceTree = ""; }; FA1941CA0D94A70100DD942E /* ConfigFrameworkDebug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ConfigFrameworkDebug.xcconfig; sourceTree = ""; }; @@ -1045,6 +1047,7 @@ 1495006D195FBBBD00BC5B5B /* Sparkle */ = { isa = PBXGroup; children = ( + 720767D01E2E3DD300F9A850 /* AppKitPrevention.h */, 61299B3909CB055000B7442F /* Appcast Support */, 55C14BD5136EEFD000649790 /* Autoupdate */, 089C1665FE841158C02AAC07 /* Framework Resources */, @@ -1179,14 +1182,15 @@ 6120721109CC5C4B007FE0F6 /* SUAutomaticUpdateAlert.m */, 6196CFE309C71ADE000DC222 /* SUStatusController.h */, 6196CFE409C71ADE000DC222 /* SUStatusController.m */, + E1545EC31E1D7E0200FAECE8 /* SUTouchBarButtonGroup.h */, + E1545EC41E1D7E0200FAECE8 /* SUTouchBarButtonGroup.m */, + E19CA4901E2E7E4D009D4D18 /* SUTouchBarForwardDeclarations.h */, 61B5FCA009C5228F00B25A18 /* SUUpdateAlert.h */, 61B5FCA109C5228F00B25A18 /* SUUpdateAlert.m */, 612DCBAD0D488BC60015DBEA /* SUUpdatePermissionPrompt.h */, 612DCBAE0D488BC60015DBEA /* SUUpdatePermissionPrompt.m */, 7205C42F1E1215AD00E370AE /* SUUpdatePermissionResponse.h */, 7205C4301E1215AD00E370AE /* SUUpdatePermissionResponse.m */, - E1545EC31E1D7E0200FAECE8 /* SUTouchBarButtonGroup.h */, - E1545EC41E1D7E0200FAECE8 /* SUTouchBarButtonGroup.m */, ); name = "User Interface"; sourceTree = ""; @@ -1390,7 +1394,6 @@ 6102FE4A0E07803800F85D09 /* SUDiskImageUnarchiver.h in Headers */, 61299A2F09CA2DAB00B7442F /* SUDSAVerifier.h in Headers */, 55E6F33319EC9F6C00005E76 /* SUErrors.h in Headers */, - E1545EC51E1D7E0200FAECE8 /* SUTouchBarButtonGroup.h in Headers */, 14652F8419A978C200959E44 /* SUExport.h in Headers */, 7275F9C11B5F1F2900B1D19E /* SUFileManager.h in Headers */, 722954C41D04E66F00ECF9CA /* SUFileOperationConstants.h in Headers */, @@ -1409,6 +1412,7 @@ 6196CFF909C72148000DC222 /* SUStatusController.h in Headers */, 61A2279C0D1CEE7600430CCD /* SUSystemProfiler.h in Headers */, 72316BE31E0E1C7F0039EFD9 /* SUSystemUpdateInfo.h in Headers */, + E1545EC51E1D7E0200FAECE8 /* SUTouchBarButtonGroup.h in Headers */, 61B93A3C0DD02D7000DCD2F8 /* SUUIBasedUpdateDriver.h in Headers */, 61299A8D09CA790200B7442F /* SUUnarchiver.h in Headers */, 722589DA1E0B19F4005EA0B9 /* SUUnarchiverNotifier.h in Headers */, @@ -1884,7 +1888,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 72464F7D1E213ED400FB341C /* SUOperatingSystem.m in Sources */, 5AE13FA01E0D4F65000D2C2C /* Appcast.swift in Sources */, 5AAD00521E0BE6BE00AF411E /* ArchiveItem.swift in Sources */, 5AAD00681E0C2DAB00AF411E /* bscommon.c in Sources */, @@ -1903,6 +1906,7 @@ 5AE13FA21E0D716F000D2C2C /* SUFileManager.m in Sources */, 5AE13FA41E0D71D1000D2C2C /* SUFileOperationConstants.m in Sources */, 5AE13FB81E0D9F8E000D2C2C /* SULog.m in Sources */, + 72464F7D1E213ED400FB341C /* SUOperatingSystem.m in Sources */, 5AE13FB61E0D9F39000D2C2C /* SUPipedUnarchiver.m in Sources */, 5AE13FA61E0D7275000D2C2C /* SUStandardVersionComparator.m in Sources */, 5AE13FA11E0D7168000D2C2C /* SUUnarchiver.m in Sources */, diff --git a/Sparkle/AppKitPrevention.h b/Sparkle/AppKitPrevention.h new file mode 100644 index 00000000..0ede52ff --- /dev/null +++ b/Sparkle/AppKitPrevention.h @@ -0,0 +1,20 @@ +// +// AppKitPrevention.h +// Sparkle +// +// Created by Mayur Pawashe on 1/17/17. +// Copyright © 2017 Sparkle Project. All rights reserved. +// + +// #include (not #import) this header to prevent AppKit from being imported +// Note this should be your LAST #include in your implementation file + +// If this error is triggered, you can have Xcode indicate to you which source file including this header caused the issue + +// One may wonder for certain targets where AppKit is banned completely, why just not link AppKit instead. +// Well, Xcode has thing called auto-linking that I don't trust very much. +// Even after trying to disable the setting, I've had targets able to link to AppKit without AppKit being specified in the list of linked libraries. + +#ifdef _APPKITDEFINES_H +#error This is a core or daemon-safe module and should NOT import AppKit +#endif 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 0d280c31..6783684d 100644 --- a/Sparkle/SUAppcast.m +++ b/Sparkle/SUAppcast.m @@ -12,6 +12,9 @@ #import "SULocalizations.h" #import "SUErrors.h" + +#include "AppKitPrevention.h" + @interface NSXMLElement (SUAppcastExtensions) @property (readonly, copy) NSDictionary *attributesAsDictionary; @end @@ -69,7 +72,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/SUAppcastItem.m b/Sparkle/SUAppcastItem.m index b30c970a..1f9ed7a1 100644 --- a/Sparkle/SUAppcastItem.m +++ b/Sparkle/SUAppcastItem.m @@ -10,6 +10,9 @@ #import "SULog.h" #import "SUConstants.h" + +#include "AppKitPrevention.h" + @interface SUAppcastItem () @property (copy, readwrite) NSString *title; @property (copy, readwrite) NSString *dateString; diff --git a/Sparkle/SUAutomaticUpdateAlert.m b/Sparkle/SUAutomaticUpdateAlert.m index c5fc0ed9..25d751c6 100644 --- a/Sparkle/SUAutomaticUpdateAlert.m +++ b/Sparkle/SUAutomaticUpdateAlert.m @@ -11,6 +11,7 @@ #import "SUAppcastItem.h" #import "SUApplicationInfo.h" #import "SUHost.h" +#import "SUTouchBarForwardDeclarations.h" #import "SUTouchBarButtonGroup.h" static NSString *const SUAutomaticUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDENTIFIER ".SUAutomaticUpdateAlert"; @@ -109,7 +110,7 @@ static NSString *const SUAutomaticUpdateAlertTouchBarIndentifier = @"" SPARKLE_B - (NSTouchBar *)makeTouchBar { - NSTouchBar *touchBar = [[NSTouchBar alloc] init]; + NSTouchBar *touchBar = [[NSClassFromString(@"NSTouchBar") alloc] init]; touchBar.defaultItemIdentifiers = @[SUAutomaticUpdateAlertTouchBarIndentifier,]; touchBar.principalItemIdentifier = SUAutomaticUpdateAlertTouchBarIndentifier; touchBar.delegate = self; @@ -119,7 +120,7 @@ static NSString *const SUAutomaticUpdateAlertTouchBarIndentifier = @"" SPARKLE_B - (NSTouchBarItem *)touchBar:(NSTouchBar * __unused)touchBar makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier { if ([identifier isEqualToString:SUAutomaticUpdateAlertTouchBarIndentifier]) { - NSCustomTouchBarItem* item = [[NSCustomTouchBarItem alloc] initWithIdentifier:identifier]; + NSCustomTouchBarItem* item = [(NSCustomTouchBarItem *)[NSClassFromString(@"NSCustomTouchBarItem") alloc] initWithIdentifier:identifier]; item.viewController = [[SUTouchBarButtonGroup alloc] initByReferencingButtons:@[self.installButton, self.laterButton, self.skipButton]]; return item; } diff --git a/Sparkle/SUBinaryDeltaApply.m b/Sparkle/SUBinaryDeltaApply.m index eac297b4..ea93b2be 100644 --- a/Sparkle/SUBinaryDeltaApply.m +++ b/Sparkle/SUBinaryDeltaApply.m @@ -15,6 +15,9 @@ #include #include + +#include "AppKitPrevention.h" + static BOOL applyBinaryDeltaToFile(xar_t x, xar_file_t file, NSString *sourceFilePath, NSString *destinationFilePath) { NSString *patchFile = temporaryFilename(@"apply-binary-delta"); diff --git a/Sparkle/SUBinaryDeltaCommon.m b/Sparkle/SUBinaryDeltaCommon.m index 5f6ce079..42e9d6c0 100644 --- a/Sparkle/SUBinaryDeltaCommon.m +++ b/Sparkle/SUBinaryDeltaCommon.m @@ -18,6 +18,9 @@ #include #include + +#include "AppKitPrevention.h" + int compareFiles(const FTSENT **a, const FTSENT **b) { return strcoll((*a)->fts_name, (*b)->fts_name); diff --git a/Sparkle/SUBinaryDeltaCreate.m b/Sparkle/SUBinaryDeltaCreate.m index 0a8fbc52..b0dfa3ef 100644 --- a/Sparkle/SUBinaryDeltaCreate.m +++ b/Sparkle/SUBinaryDeltaCreate.m @@ -21,6 +21,9 @@ #include #include + +#include "AppKitPrevention.h" + extern int bsdiff(int argc, const char **argv); @interface CreateBinaryDeltaOperation : NSOperation diff --git a/Sparkle/SUBinaryDeltaTool.m b/Sparkle/SUBinaryDeltaTool.m index ea83fdd0..fae14ed1 100644 --- a/Sparkle/SUBinaryDeltaTool.m +++ b/Sparkle/SUBinaryDeltaTool.m @@ -20,6 +20,8 @@ #define VERSION_COMMAND @"version" #define VERSION_ALTERNATE_COMMAND @"--version" +#include "AppKitPrevention.h" + static void printUsage(NSString *programName) { fprintf(stderr, "Usage:\n"); diff --git a/Sparkle/SUBinaryDeltaUnarchiver.m b/Sparkle/SUBinaryDeltaUnarchiver.m index 3863ce10..7dfce787 100644 --- a/Sparkle/SUBinaryDeltaUnarchiver.m +++ b/Sparkle/SUBinaryDeltaUnarchiver.m @@ -13,6 +13,9 @@ #import "SULog.h" #import "SUFileManager.h" + +#include "AppKitPrevention.h" + @interface SUBinaryDeltaUnarchiver () @property (nonatomic, copy, readonly) NSString *archivePath; diff --git a/Sparkle/SUBundleIcon.m b/Sparkle/SUBundleIcon.m index 97e22698..3061c65e 100644 --- a/Sparkle/SUBundleIcon.m +++ b/Sparkle/SUBundleIcon.m @@ -9,6 +9,9 @@ #import "SUBundleIcon.h" #import "SUHost.h" + +#include "AppKitPrevention.h" + @implementation SUBundleIcon // Note: To obtain the most current bundle icon file from the Info dictionary, this should take a SUHost, not a NSBundle diff --git a/Sparkle/SUCodeSigningVerifier.m b/Sparkle/SUCodeSigningVerifier.m index 6f4da51d..17ccf012 100644 --- a/Sparkle/SUCodeSigningVerifier.m +++ b/Sparkle/SUCodeSigningVerifier.m @@ -11,6 +11,9 @@ #import "SUCodeSigningVerifier.h" #import "SULog.h" + +#include "AppKitPrevention.h" + @implementation SUCodeSigningVerifier + (BOOL)codeSignatureAtBundleURL:(NSURL *)oldBundleURL matchesSignatureAtBundleURL:(NSURL *)newBundleURL error:(NSError *__autoreleasing *)error diff --git a/Sparkle/SUConstants.m b/Sparkle/SUConstants.m index f5e73fda..5e883f6f 100644 --- a/Sparkle/SUConstants.m +++ b/Sparkle/SUConstants.m @@ -13,6 +13,8 @@ #define DEBUG 0 #endif +#include "AppKitPrevention.h" + // Define some minimum intervals to avoid DoS-like checking attacks const NSTimeInterval SUMinimumUpdateCheckInterval = DEBUG ? 60 : (60 * 60); const NSTimeInterval SUDefaultUpdateCheckInterval = DEBUG ? 60 : (60 * 60 * 24); diff --git a/Sparkle/SUDSAVerifier.m b/Sparkle/SUDSAVerifier.m index 9f959f05..a0fa38a9 100644 --- a/Sparkle/SUDSAVerifier.m +++ b/Sparkle/SUDSAVerifier.m @@ -16,6 +16,9 @@ #import "SULog.h" #include + +#include "AppKitPrevention.h" + @implementation SUDSAVerifier { SecKeyRef _secKey; } diff --git a/Sparkle/SUDiskImageUnarchiver.m b/Sparkle/SUDiskImageUnarchiver.m index c2207076..4c1672c6 100644 --- a/Sparkle/SUDiskImageUnarchiver.m +++ b/Sparkle/SUDiskImageUnarchiver.m @@ -10,6 +10,9 @@ #import "SUUnarchiverNotifier.h" #import "SULog.h" + +#include "AppKitPrevention.h" + @interface SUDiskImageUnarchiver () @property (nonatomic, copy, readonly) NSString *archivePath; diff --git a/Sparkle/SUFileManager.m b/Sparkle/SUFileManager.m index 26369b63..98800e3a 100644 --- a/Sparkle/SUFileManager.m +++ b/Sparkle/SUFileManager.m @@ -15,6 +15,9 @@ #include #include + +#include "AppKitPrevention.h" + static char SUAppleQuarantineIdentifier[] = "com.apple.quarantine"; static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) { diff --git a/Sparkle/SUGuidedPackageInstaller.m b/Sparkle/SUGuidedPackageInstaller.m index 308b186c..cea993a2 100644 --- a/Sparkle/SUGuidedPackageInstaller.m +++ b/Sparkle/SUGuidedPackageInstaller.m @@ -9,6 +9,9 @@ #import "SUGuidedPackageInstaller.h" #import "SUFileManager.h" + +#include "AppKitPrevention.h" + @interface SUGuidedPackageInstaller () @property (nonatomic, readonly, copy) NSString *packagePath; diff --git a/Sparkle/SUHost.m b/Sparkle/SUHost.m index 659f59b4..13dfe144 100644 --- a/Sparkle/SUHost.m +++ b/Sparkle/SUHost.m @@ -11,6 +11,9 @@ #include // For statfs for isRunningOnReadOnlyVolume #import "SULog.h" + +#include "AppKitPrevention.h" + // This class should not rely on AppKit and should also be process independent // For example, it should not have code that tests writabilty to somewhere on disk, // as that may depend on the privileges of the process owner. Or code that depends on diff --git a/Sparkle/SUInstaller.m b/Sparkle/SUInstaller.m index 4ef9ec50..8a9d8f38 100644 --- a/Sparkle/SUInstaller.m +++ b/Sparkle/SUInstaller.m @@ -15,6 +15,9 @@ #import "SULog.h" #import "SUErrors.h" + +#include "AppKitPrevention.h" + @implementation SUInstaller + (BOOL)isAliasFolderAtPath:(NSString *)path diff --git a/Sparkle/SULog.m b/Sparkle/SULog.m index e500c460..1e816b75 100644 --- a/Sparkle/SULog.m +++ b/Sparkle/SULog.m @@ -15,25 +15,24 @@ #define STRINGIFY(x) #x #define TO_STRING(x) STRINGIFY(x) +#include "AppKitPrevention.h" + void SULog(SULogLevel level, NSString *format, ...) { static aslclient client; static dispatch_queue_t queue; static dispatch_once_t onceToken; - + static os_log_t logger; static BOOL hasOSLogging; - + dispatch_once(&onceToken, ^{ NSBundle *mainBundle = [NSBundle mainBundle]; - + hasOSLogging = [SUOperatingSystem isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){10, 12, 0}]; - - NSString *mainBundleIdentifier = mainBundle.bundleIdentifier; - NSString *bundleIdentifier = (mainBundleIdentifier != nil) ? mainBundleIdentifier : @""SPARKLE_BUNDLE_IDENTIFIER; - + if (hasOSLogging) { - const char *subsystem = [[bundleIdentifier stringByAppendingString:@".Sparkle"] UTF8String]; + const char *subsystem = SPARKLE_BUNDLE_IDENTIFIER; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wpartial-availability" // This creates a thread-safe object @@ -44,23 +43,23 @@ void SULog(SULogLevel level, NSString *format, ...) // Act the same way os_log() does; don't log to stderr if a terminal device is attached if (!isatty(STDERR_FILENO)) { options |= ASL_OPT_STDERR; - } + } NSString *displayName = [[NSFileManager defaultManager] displayNameAtPath:mainBundle.bundlePath]; - client = asl_open([displayName stringByAppendingString:@" [Sparkle]"].UTF8String, bundleIdentifier.UTF8String, options); + client = asl_open([displayName stringByAppendingString:@" [Sparkle]"].UTF8String, SPARKLE_BUNDLE_IDENTIFIER, options); queue = dispatch_queue_create(NULL, DISPATCH_QUEUE_SERIAL); } }); - + if (!hasOSLogging && client == NULL) { return; } - + va_list ap; va_start(ap, format); NSString *logMessage = [[NSString alloc] initWithFormat:format arguments:ap]; va_end(ap); - + // Use os_log if available (on 10.12+) if (hasOSLogging) { // We'll make all of our messages formatted as public; just don't log sensitive information. @@ -78,11 +77,11 @@ void SULog(SULogLevel level, NSString *format, ...) // See docs for OS_LOG_TYPE_ERROR os_log_error(logger, "%{public}@", logMessage); break; - } + } #pragma clang diagnostic pop return; - } - +} + // Otherwise use ASL // Make sure we do not async, because if we async, the log may not be delivered deterministically dispatch_sync(queue, ^{ @@ -90,7 +89,7 @@ void SULog(SULogLevel level, NSString *format, ...) if (message == NULL) { return; } - + if (asl_set(message, ASL_KEY_MSG, logMessage.UTF8String) != 0) { return; } diff --git a/Sparkle/SUOperatingSystem.m b/Sparkle/SUOperatingSystem.m index 4a7d73aa..fada18c3 100644 --- a/Sparkle/SUOperatingSystem.m +++ b/Sparkle/SUOperatingSystem.m @@ -7,6 +7,9 @@ #import "SUOperatingSystem.h" + +#include "AppKitPrevention.h" + #if __MAC_OS_X_VERSION_MAX_ALLOWED < 101000 @interface NSProcessInfo () - (NSOperatingSystemVersion)operatingSystemVersion; diff --git a/Sparkle/SUPackageInstaller.m b/Sparkle/SUPackageInstaller.m index 61f3355a..92654742 100644 --- a/Sparkle/SUPackageInstaller.m +++ b/Sparkle/SUPackageInstaller.m @@ -11,6 +11,9 @@ #import "SUErrors.h" #import "SULog.h" + +#include "AppKitPrevention.h" + @interface SUPackageInstaller () @property (nonatomic, readonly, copy) NSString *packagePath; diff --git a/Sparkle/SUPipedUnarchiver.m b/Sparkle/SUPipedUnarchiver.m index d5d7ad4d..3c3e2005 100644 --- a/Sparkle/SUPipedUnarchiver.m +++ b/Sparkle/SUPipedUnarchiver.m @@ -11,6 +11,9 @@ #import "SULog.h" #import "SUErrors.h" + +#include "AppKitPrevention.h" + @interface SUPipedUnarchiver () @property (nonatomic, copy, readonly) NSString *archivePath; diff --git a/Sparkle/SUPlainInstaller.m b/Sparkle/SUPlainInstaller.m index 98ef2c74..81ee5cfd 100644 --- a/Sparkle/SUPlainInstaller.m +++ b/Sparkle/SUPlainInstaller.m @@ -14,6 +14,9 @@ #import "SULog.h" #import "SUErrors.h" + +#include "AppKitPrevention.h" + @interface SUPlainInstaller () @property (nonatomic, readonly) SUHost *host; diff --git a/Sparkle/SUStandardVersionComparator.m b/Sparkle/SUStandardVersionComparator.m index 7bc68181..a2958e82 100644 --- a/Sparkle/SUStandardVersionComparator.m +++ b/Sparkle/SUStandardVersionComparator.m @@ -9,6 +9,9 @@ #import "SUVersionComparisonProtocol.h" #import "SUStandardVersionComparator.h" + +#include "AppKitPrevention.h" + @implementation SUStandardVersionComparator - (instancetype)init diff --git a/Sparkle/SUStatusController.m b/Sparkle/SUStatusController.m index f4f8bc04..efe383dd 100644 --- a/Sparkle/SUStatusController.m +++ b/Sparkle/SUStatusController.m @@ -11,6 +11,7 @@ #import "SUHost.h" #import "SULocalizations.h" #import "SUApplicationInfo.h" +#import "SUTouchBarForwardDeclarations.h" #import "SUTouchBarButtonGroup.h" static NSString *const SUStatusControllerTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDENTIFIER ".SUStatusController"; @@ -135,7 +136,7 @@ static NSString *const SUStatusControllerTouchBarIndentifier = @"" SPARKLE_BUNDL - (NSTouchBar *)makeTouchBar { - NSTouchBar *touchBar = [[NSTouchBar alloc] init]; + NSTouchBar *touchBar = [[NSClassFromString(@"NSTouchBar") alloc] init]; touchBar.defaultItemIdentifiers = @[ SUStatusControllerTouchBarIndentifier,]; touchBar.principalItemIdentifier = SUStatusControllerTouchBarIndentifier; touchBar.delegate = self; @@ -145,7 +146,7 @@ static NSString *const SUStatusControllerTouchBarIndentifier = @"" SPARKLE_BUNDL - (NSTouchBarItem *)touchBar:(NSTouchBar * __unused)touchBar makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier { if ([identifier isEqualToString:SUStatusControllerTouchBarIndentifier]) { - NSCustomTouchBarItem *item = [[NSCustomTouchBarItem alloc] initWithIdentifier:identifier]; + NSCustomTouchBarItem *item = [(NSCustomTouchBarItem *)[NSClassFromString(@"NSCustomTouchBarItem") alloc] initWithIdentifier:identifier]; SUTouchBarButtonGroup *group = [[SUTouchBarButtonGroup alloc] initByReferencingButtons:@[self.actionButton,]]; item.viewController = group; self.touchBarButton = group.buttons.firstObject; diff --git a/Sparkle/SUSystemProfiler.h b/Sparkle/SUSystemProfiler.h index 6223e22e..4bf05472 100644 --- a/Sparkle/SUSystemProfiler.h +++ b/Sparkle/SUSystemProfiler.h @@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN @class SUHost; @interface SUSystemProfiler : NSObject -+ (NSArray *)systemProfileArrayForHost:(SUHost *)host; ++ (NSArray *> *)systemProfileArrayForHost:(SUHost *)host; @end diff --git a/Sparkle/SUSystemProfiler.m b/Sparkle/SUSystemProfiler.m index ae2f10f5..1d3c085c 100644 --- a/Sparkle/SUSystemProfiler.m +++ b/Sparkle/SUSystemProfiler.m @@ -9,11 +9,13 @@ #import #import "SUSystemProfiler.h" - #import "SUHost.h" #import "SUOperatingSystem.h" #include + +#include "AppKitPrevention.h" + static NSString *const SUSystemProfilerApplicationNameKey = @"appName"; static NSString *const SUSystemProfilerApplicationVersionKey = @"appVersion"; static NSString *const SUSystemProfilerCPU64bitKey = @"cpu64bit"; @@ -28,19 +30,19 @@ static NSString *const SUSystemProfilerPreferredLanguageKey = @"lang"; @implementation SUSystemProfiler -+ (NSDictionary *)modelTranslationTable ++ (NSDictionary *)modelTranslationTable { // Use explicit class to use the correct bundle even when subclassed NSString *path = [[NSBundle bundleForClass:[SUSystemProfiler class]] pathForResource:@"SUModelTranslation" ofType:@"plist"]; return [[NSDictionary alloc] initWithContentsOfFile:path]; } -+ (NSArray *)systemProfileArrayForHost:(SUHost *)host ++ (NSArray *> *)systemProfileArrayForHost:(SUHost *)host { - NSDictionary *modelTranslation = [self modelTranslationTable]; + NSDictionary *modelTranslation = [self modelTranslationTable]; // Gather profile information and append it to the URL. - NSMutableArray *profileArray = [NSMutableArray array]; + NSMutableArray *> *profileArray = [NSMutableArray array]; NSArray *profileDictKeys = @[@"key", @"displayKey", @"value", @"displayValue"]; int error = 0; int value = 0; diff --git a/Sparkle/SUSystemUpdateInfo.m b/Sparkle/SUSystemUpdateInfo.m index 7ef2dd8f..78325eae 100644 --- a/Sparkle/SUSystemUpdateInfo.m +++ b/Sparkle/SUSystemUpdateInfo.m @@ -11,6 +11,9 @@ #import "SUConstants.h" #import "SUFileManager.h" + +#include "AppKitPrevention.h" + @implementation SUSystemUpdateInfo + (BOOL)systemAllowsAutomaticUpdatesForHost:(SUHost *)host diff --git a/Sparkle/SUTouchBarButtonGroup.h b/Sparkle/SUTouchBarButtonGroup.h index 55337b06..e86f9559 100644 --- a/Sparkle/SUTouchBarButtonGroup.h +++ b/Sparkle/SUTouchBarButtonGroup.h @@ -8,10 +8,6 @@ #import -@class NSTouchBar; -@class NSTouchBarItem; -@class NSCustomTouchBarItem; - NS_ASSUME_NONNULL_BEGIN @interface SUTouchBarButtonGroup : NSViewController diff --git a/Sparkle/SUTouchBarButtonGroup.m b/Sparkle/SUTouchBarButtonGroup.m index e8979fe9..ef27d131 100644 --- a/Sparkle/SUTouchBarButtonGroup.m +++ b/Sparkle/SUTouchBarButtonGroup.m @@ -8,6 +8,12 @@ #import "SUTouchBarButtonGroup.h" +#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101200 +@interface NSButton (SierraSDK) ++ (instancetype)buttonWithTitle:(NSString*)title target:(id)target action:(SEL)action; +@end +#endif + @implementation SUTouchBarButtonGroup @synthesize buttons = _buttons; @@ -23,8 +29,11 @@ NSMutableArray *buttonCopies = [NSMutableArray arrayWithCapacity:buttons.count]; for (NSUInteger i = 0; i < buttons.count; i++) { - NSButton *button = buttons[i]; + NSButton *button = [buttons objectAtIndex:i]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wpartial-availability" NSButton *buttonCopy = [NSButton buttonWithTitle:button.title target:button.target action:button.action]; +#pragma clang diagnostic pop buttonCopy.tag = button.tag; buttonCopy.enabled = button.enabled; @@ -46,15 +55,18 @@ if (i == 0) { [constraints addObject:[NSLayoutConstraint constraintWithItem:buttonCopy attribute:NSLayoutAttributeTrailing relatedBy:NSLayoutRelationEqual toItem:buttonGroup attribute:NSLayoutAttributeTrailing multiplier:1.0 constant:0.0]]; } else { - [constraints addObject:[NSLayoutConstraint constraintWithItem:buttonCopy attribute:NSLayoutAttributeTrailing relatedBy:NSLayoutRelationEqual toItem:buttonCopies[i - 1] attribute:NSLayoutAttributeLeading multiplier:1.0 constant:(i == 1) ? -8 : -32]]; - [constraints addObject:[NSLayoutConstraint constraintWithItem:buttonCopy attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:buttonCopies[i - 1] attribute:NSLayoutAttributeWidth multiplier:1.0 constant:0.0]]; + [constraints addObject:[NSLayoutConstraint constraintWithItem:buttonCopy attribute:NSLayoutAttributeTrailing relatedBy:NSLayoutRelationEqual toItem:[buttonCopies objectAtIndex:i - 1] attribute:NSLayoutAttributeLeading multiplier:1.0 constant:(i == 1) ? -8 : -32]]; + [constraints addObject:[NSLayoutConstraint constraintWithItem:buttonCopy attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:[buttonCopies objectAtIndex:i - 1] attribute:NSLayoutAttributeWidth multiplier:1.0 constant:0.0]]; constraints.lastObject.priority = 250; } if (i == buttons.count - 1) { [constraints addObject:[NSLayoutConstraint constraintWithItem:buttonCopy attribute:NSLayoutAttributeLeading relatedBy:NSLayoutRelationEqual toItem:buttonGroup attribute:NSLayoutAttributeLeading multiplier:1.0 constant:0.0]]; } } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wpartial-availability" [NSLayoutConstraint activateConstraints:constraints]; +#pragma clang diagnostic pop _buttons = buttonCopies; return self; diff --git a/Sparkle/SUTouchBarForwardDeclarations.h b/Sparkle/SUTouchBarForwardDeclarations.h new file mode 100644 index 00000000..2844ef03 --- /dev/null +++ b/Sparkle/SUTouchBarForwardDeclarations.h @@ -0,0 +1,91 @@ +// +// SUTouchBarForwardDeclarations.h +// Sparkle +// +// Created by Yuxin Wang on 18/01/2017. +// Copyright © 2017 Sparkle Project. All rights reserved. +// + +// Once Sparkle no longer supports OSX 10.12.0, this file can be deleted. + +#import + +#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101201 + +NS_ASSUME_NONNULL_BEGIN + +@class NSTouchBar; +@class NSTouchBarItem; +@class NSCustomTouchBarItem; + +typedef NSString * NSTouchBarItemIdentifier NS_EXTENSIBLE_STRING_ENUM; +typedef NSString * NSTouchBarCustomizationIdentifier NS_EXTENSIBLE_STRING_ENUM; + +@protocol NSTouchBarDelegate; + +NS_CLASS_AVAILABLE_MAC(10_12_2) +@interface NSTouchBar : NSObject + +- (instancetype)init NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER; + +@property (copy, nullable) NSTouchBarCustomizationIdentifier customizationIdentifier; +@property (copy) NSArray *customizationAllowedItemIdentifiers; +@property (copy) NSArray *customizationRequiredItemIdentifiers; +@property (copy) NSArray *defaultItemIdentifiers; +@property (copy, readonly) NSArray *itemIdentifiers; +@property (copy, nullable) NSTouchBarItemIdentifier principalItemIdentifier; +@property (copy, nullable) NSTouchBarItemIdentifier escapeKeyReplacementItemIdentifier; +@property (copy) NSSet *templateItems; +@property (nullable, weak) id delegate; +- (nullable __kindof NSTouchBarItem *)itemForIdentifier:(NSTouchBarItemIdentifier)identifier; +@property (readonly, getter=isVisible) BOOL visible; + +@end + +@protocol NSTouchBarDelegate +@optional +- (nullable NSTouchBarItem*)touchBar:(NSTouchBar*)touchBar + makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier; +@end + +typedef float NSTouchBarItemPriority _NS_TYPED_EXTENSIBLE_ENUM; + +NS_CLASS_AVAILABLE_MAC(10_12_2) +@interface NSTouchBarItem : NSObject + +- (instancetype)initWithIdentifier:(NSTouchBarItemIdentifier)identifier NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@property (readonly, copy) NSTouchBarItemIdentifier identifier; +@property NSTouchBarItemPriority visibilityPriority; +@property (readonly, nullable) NSView *view; +@property (readonly, nullable) NSViewController *viewController; +@property (readonly, copy) NSString *customizationLabel; +@property (readonly, getter=isVisible) BOOL visible; + +@end + +NS_CLASS_AVAILABLE_MAC(10_12_2) +@interface NSCustomTouchBarItem : NSTouchBarItem + +@property (readwrite, strong) __kindof NSView *view; +@property (readwrite, strong, nullable) __kindof NSViewController *viewController; +@property (readwrite, copy, null_resettable) NSString *customizationLabel; + +@end + +NS_ASSUME_NONNULL_END + +#else + +// When compiling against the 10.12.1 SDK or later, just provide forward +// declarations to suppress the partial availability warnings. + +@class NSTouchBar; +@protocol NSTouchBarDelegate; +@class NSTouchBarItem; +@class NSCustomTouchBarItem; + +#endif diff --git a/Sparkle/SUUnarchiver.m b/Sparkle/SUUnarchiver.m index 7b808814..9cb33bc6 100644 --- a/Sparkle/SUUnarchiver.m +++ b/Sparkle/SUUnarchiver.m @@ -12,6 +12,9 @@ #import "SUDiskImageUnarchiver.h" #import "SUBinaryDeltaUnarchiver.h" + +#include "AppKitPrevention.h" + @implementation SUUnarchiver + (nullable id )unarchiverForPath:(NSString *)path updatingHostBundlePath:(nullable NSString *)hostPath decryptionPassword:(nullable NSString *)decryptionPassword diff --git a/Sparkle/SUUnarchiverNotifier.m b/Sparkle/SUUnarchiverNotifier.m index 727ac7da..643f0eb9 100644 --- a/Sparkle/SUUnarchiverNotifier.m +++ b/Sparkle/SUUnarchiverNotifier.m @@ -10,6 +10,9 @@ #import "SULocalizations.h" #import "SUErrors.h" + +#include "AppKitPrevention.h" + @interface SUUnarchiverNotifier () @property (nonatomic, readonly, copy) void (^completionBlock)(NSError * _Nullable); diff --git a/Sparkle/SUUpdateAlert.m b/Sparkle/SUUpdateAlert.m index 78a01647..0a674f4d 100644 --- a/Sparkle/SUUpdateAlert.m +++ b/Sparkle/SUUpdateAlert.m @@ -21,6 +21,7 @@ #import "SUAppcastItem.h" #import "SUApplicationInfo.h" #import "SUSystemUpdateInfo.h" +#import "SUTouchBarForwardDeclarations.h" #import "SUTouchBarButtonGroup.h" static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDENTIFIER ".SUUpdateAlert"; @@ -325,7 +326,7 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE - (NSTouchBar *)makeTouchBar { - NSTouchBar *touchBar = [[NSTouchBar alloc] init]; + NSTouchBar *touchBar = [[NSClassFromString(@"NSTouchBar") alloc] init]; touchBar.defaultItemIdentifiers = @[SUUpdateAlertTouchBarIndentifier,]; touchBar.principalItemIdentifier = SUUpdateAlertTouchBarIndentifier; touchBar.delegate = self; @@ -335,7 +336,7 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE - (NSTouchBarItem *)touchBar:(NSTouchBar * __unused)touchBar makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier { if ([identifier isEqualToString:SUUpdateAlertTouchBarIndentifier]) { - NSCustomTouchBarItem* item = [[NSCustomTouchBarItem alloc] initWithIdentifier:identifier]; + NSCustomTouchBarItem* item = [(NSCustomTouchBarItem *)[NSClassFromString(@"NSCustomTouchBarItem") alloc] initWithIdentifier:identifier]; item.viewController = [[SUTouchBarButtonGroup alloc] initByReferencingButtons:@[self.installButton, self.laterButton, self.skipButton]]; return item; } diff --git a/Sparkle/SUUpdatePermissionPrompt.m b/Sparkle/SUUpdatePermissionPrompt.m index 9f2802a6..7f1c0055 100644 --- a/Sparkle/SUUpdatePermissionPrompt.m +++ b/Sparkle/SUUpdatePermissionPrompt.m @@ -13,6 +13,7 @@ #import "SUConstants.h" #import "SULocalizations.h" #import "SUApplicationInfo.h" +#import "SUTouchBarForwardDeclarations.h" #import "SUTouchBarButtonGroup.h" static NSString *const SUUpdatePermissionPromptTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDENTIFIER ".SUUpdatePermissionPrompt"; @@ -169,7 +170,7 @@ static NSString *const SUUpdatePermissionPromptTouchBarIndentifier = @"" SPARKLE - (NSTouchBar *)makeTouchBar { - NSTouchBar *touchBar = [[NSTouchBar alloc] init]; + NSTouchBar *touchBar = [[NSClassFromString(@"NSTouchBar") alloc] init]; touchBar.defaultItemIdentifiers = @[SUUpdatePermissionPromptTouchBarIndentifier,]; touchBar.principalItemIdentifier = SUUpdatePermissionPromptTouchBarIndentifier; touchBar.delegate = self; @@ -179,7 +180,7 @@ static NSString *const SUUpdatePermissionPromptTouchBarIndentifier = @"" SPARKLE - (NSTouchBarItem *)touchBar:(NSTouchBar * __unused)touchBar makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier { if ([identifier isEqualToString:SUUpdatePermissionPromptTouchBarIndentifier]) { - NSCustomTouchBarItem* item = [[NSCustomTouchBarItem alloc] initWithIdentifier:identifier]; + NSCustomTouchBarItem* item = [(NSCustomTouchBarItem *)[NSClassFromString(@"NSCustomTouchBarItem") alloc] initWithIdentifier:identifier]; item.viewController = [[SUTouchBarButtonGroup alloc] initByReferencingButtons:@[self.checkButton, self.cancelButton]]; return item; } diff --git a/Sparkle/SUUpdatePermissionResponse.m b/Sparkle/SUUpdatePermissionResponse.m index 02c89acd..203ff151 100644 --- a/Sparkle/SUUpdatePermissionResponse.m +++ b/Sparkle/SUUpdatePermissionResponse.m @@ -8,6 +8,9 @@ #import "SUUpdatePermissionResponse.h" + +#include "AppKitPrevention.h" + @implementation SUUpdatePermissionResponse @synthesize automaticUpdateChecks = _automaticUpdateChecks; diff --git a/Sparkle/SUUpdateValidator.m b/Sparkle/SUUpdateValidator.m index deb8f01d..e00652ef 100644 --- a/Sparkle/SUUpdateValidator.m +++ b/Sparkle/SUUpdateValidator.m @@ -13,6 +13,9 @@ #import "SUHost.h" #import "SULog.h" + +#include "AppKitPrevention.h" + @interface SUUpdateValidator () @property (nonatomic, readonly) SUHost *host; diff --git a/Sparkle/SUUpdater.h b/Sparkle/SUUpdater.h index f627ed14..679f1b79 100644 --- a/Sparkle/SUUpdater.h +++ b/Sparkle/SUUpdater.h @@ -160,7 +160,11 @@ SU_EXPORT @interface SUUpdater : NSObject The keys of this dictionary are HTTP header fields (NSString) and values are corresponding values (NSString) */ +#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/SUUpdater.m b/Sparkle/SUUpdater.m index ca3b8e24..9a951b3b 100644 --- a/Sparkle/SUUpdater.m +++ b/Sparkle/SUUpdater.m @@ -210,7 +210,7 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults } if (shouldPrompt) { - NSArray *profileInfo = [SUSystemProfiler systemProfileArrayForHost:self.host]; + NSArray *> *profileInfo = [SUSystemProfiler systemProfileArrayForHost:self.host]; // Always say we're sending the system profile here so that the delegate displays the parameters it would send. if ([self.delegate respondsToSelector:@selector(feedParametersForUpdater:sendingSystemProfile:)]) { profileInfo = [profileInfo arrayByAddingObjectsFromArray:[self.delegate feedParametersForUpdater:self sendingSystemProfile:YES]]; diff --git a/Sparkle/SUUpdaterDelegate.h b/Sparkle/SUUpdaterDelegate.h index 522764ed..39249ac4 100644 --- a/Sparkle/SUUpdaterDelegate.h +++ b/Sparkle/SUUpdaterDelegate.h @@ -64,7 +64,11 @@ SU_EXPORT extern NSString *const SUUpdaterAppcastNotificationKey; \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. diff --git a/Sparkle/ar.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/ar.lproj/SUAutomaticUpdateAlert.xib index 7085a7d9..b327da59 100644 --- a/Sparkle/ar.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/ar.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/ar.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/ar.lproj/SUUpdatePermissionPrompt.xib index 2f0b6447..947f5e53 100644 --- a/Sparkle/ar.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/ar.lproj/SUUpdatePermissionPrompt.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/cs.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/cs.lproj/SUAutomaticUpdateAlert.xib index 92144753..a4cbdc32 100644 --- a/Sparkle/cs.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/cs.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/cs.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/cs.lproj/SUUpdatePermissionPrompt.xib index 1d5b985f..14dfbd7f 100644 --- a/Sparkle/cs.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/cs.lproj/SUUpdatePermissionPrompt.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/da.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/da.lproj/SUAutomaticUpdateAlert.xib index cd4e5232..5f1912cd 100644 --- a/Sparkle/da.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/da.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/da.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/da.lproj/SUUpdatePermissionPrompt.xib index 91ceadc3..d993fddc 100644 --- a/Sparkle/da.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/da.lproj/SUUpdatePermissionPrompt.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/de.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/de.lproj/SUAutomaticUpdateAlert.xib index 42880e77..53f2e062 100644 --- a/Sparkle/de.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/de.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/de.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/de.lproj/SUUpdatePermissionPrompt.xib index 4a94522d..af334262 100644 --- a/Sparkle/de.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/de.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Sparkle/el.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/el.lproj/SUAutomaticUpdateAlert.xib index fb2e0e75..c18f3d2a 100644 --- a/Sparkle/el.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/el.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/el.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/el.lproj/SUUpdatePermissionPrompt.xib index 74bb2009..5cb92b2c 100644 --- a/Sparkle/el.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/el.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Sparkle/es.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/es.lproj/SUAutomaticUpdateAlert.xib index 5fe13502..c8fc6a38 100644 --- a/Sparkle/es.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/es.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/es.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/es.lproj/SUUpdatePermissionPrompt.xib index ea302622..19541050 100644 --- a/Sparkle/es.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/es.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Sparkle/fr.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/fr.lproj/SUAutomaticUpdateAlert.xib index 86fd8bac..a5eadb15 100644 --- a/Sparkle/fr.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/fr.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/fr.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/fr.lproj/SUUpdatePermissionPrompt.xib index 5659f719..5b36e7f7 100644 --- a/Sparkle/fr.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/fr.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Sparkle/is.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/is.lproj/SUAutomaticUpdateAlert.xib index bcc84d01..867d7a18 100644 --- a/Sparkle/is.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/is.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/is.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/is.lproj/SUUpdatePermissionPrompt.xib index bf1646fe..2cac96f9 100644 --- a/Sparkle/is.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/is.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Sparkle/it.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/it.lproj/SUAutomaticUpdateAlert.xib index 6d9a160d..7c2233c5 100644 --- a/Sparkle/it.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/it.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/it.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/it.lproj/SUUpdatePermissionPrompt.xib index f8953d19..6f415046 100644 --- a/Sparkle/it.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/it.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Sparkle/ja.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/ja.lproj/SUAutomaticUpdateAlert.xib index db759968..d5ea8ef9 100644 --- a/Sparkle/ja.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/ja.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/ja.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/ja.lproj/SUUpdatePermissionPrompt.xib index f057bc28..4d61ba46 100644 --- a/Sparkle/ja.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/ja.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Sparkle/ko.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/ko.lproj/SUAutomaticUpdateAlert.xib index bab45f5b..3c4806d2 100644 --- a/Sparkle/ko.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/ko.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/ko.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/ko.lproj/SUUpdatePermissionPrompt.xib index b690af1b..1fcf7bcf 100644 --- a/Sparkle/ko.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/ko.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Sparkle/nb.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/nb.lproj/SUAutomaticUpdateAlert.xib index feb3dd08..b7b462cc 100644 --- a/Sparkle/nb.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/nb.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/nb.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/nb.lproj/SUUpdatePermissionPrompt.xib index 3521671b..f5388287 100644 --- a/Sparkle/nb.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/nb.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Sparkle/nl.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/nl.lproj/SUAutomaticUpdateAlert.xib index 281e6bd3..cf75d6d6 100644 --- a/Sparkle/nl.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/nl.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/nl.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/nl.lproj/SUUpdatePermissionPrompt.xib index fd3e7136..2fd575ba 100644 --- a/Sparkle/nl.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/nl.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Sparkle/pl.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/pl.lproj/SUAutomaticUpdateAlert.xib index aa20f8be..f2ea1090 100644 --- a/Sparkle/pl.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/pl.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/pl.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/pl.lproj/SUUpdatePermissionPrompt.xib index 2577d660..9f738325 100644 --- a/Sparkle/pl.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/pl.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Sparkle/pt_BR.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/pt_BR.lproj/SUAutomaticUpdateAlert.xib index eb78882e..af4be781 100644 --- a/Sparkle/pt_BR.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/pt_BR.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/pt_BR.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/pt_BR.lproj/SUUpdatePermissionPrompt.xib index 1d7d8f7d..175a511a 100644 --- a/Sparkle/pt_BR.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/pt_BR.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Sparkle/pt_PT.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/pt_PT.lproj/SUAutomaticUpdateAlert.xib index 1104f59c..8a318518 100644 --- a/Sparkle/pt_PT.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/pt_PT.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/pt_PT.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/pt_PT.lproj/SUUpdatePermissionPrompt.xib index 8fb42ec3..9811749d 100644 --- a/Sparkle/pt_PT.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/pt_PT.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Sparkle/ro.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/ro.lproj/SUAutomaticUpdateAlert.xib index 62f56ea0..0a4edc1f 100644 --- a/Sparkle/ro.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/ro.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/ro.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/ro.lproj/SUUpdatePermissionPrompt.xib index b5d7a693..00c4548b 100644 --- a/Sparkle/ro.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/ro.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Sparkle/ru.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/ru.lproj/SUAutomaticUpdateAlert.xib index 3de9bde8..9785187f 100644 --- a/Sparkle/ru.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/ru.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/ru.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/ru.lproj/SUUpdatePermissionPrompt.xib index 68e12bb6..ac66563b 100644 --- a/Sparkle/ru.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/ru.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Sparkle/sk.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/sk.lproj/SUAutomaticUpdateAlert.xib index 651178ef..e6ca87d1 100644 --- a/Sparkle/sk.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/sk.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/sk.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/sk.lproj/SUUpdatePermissionPrompt.xib index 7d43c3ab..97363879 100644 --- a/Sparkle/sk.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/sk.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Sparkle/sl.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/sl.lproj/SUAutomaticUpdateAlert.xib index 9c953b8a..513e9300 100644 --- a/Sparkle/sl.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/sl.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/sl.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/sl.lproj/SUUpdatePermissionPrompt.xib index 76cc3498..27602e21 100644 --- a/Sparkle/sl.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/sl.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Sparkle/sv.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/sv.lproj/SUAutomaticUpdateAlert.xib index da5b6fca..e3347629 100644 --- a/Sparkle/sv.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/sv.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/sv.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/sv.lproj/SUUpdatePermissionPrompt.xib index c284bbbf..c66273f7 100644 --- a/Sparkle/sv.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/sv.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Sparkle/th.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/th.lproj/SUAutomaticUpdateAlert.xib index 99247426..65cf51d2 100644 --- a/Sparkle/th.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/th.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/th.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/th.lproj/SUUpdatePermissionPrompt.xib index 28b147cd..2149d2b5 100644 --- a/Sparkle/th.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/th.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Sparkle/tr.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/tr.lproj/SUAutomaticUpdateAlert.xib index ba829acd..a9bd6e13 100644 --- a/Sparkle/tr.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/tr.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/tr.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/tr.lproj/SUUpdatePermissionPrompt.xib index a3521403..70bfba71 100644 --- a/Sparkle/tr.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/tr.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Sparkle/uk.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/uk.lproj/SUAutomaticUpdateAlert.xib index 5acdf402..f4201daa 100644 --- a/Sparkle/uk.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/uk.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/uk.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/uk.lproj/SUUpdatePermissionPrompt.xib index a2da1864..a1811e4f 100644 --- a/Sparkle/uk.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/uk.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Sparkle/zh_CN.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/zh_CN.lproj/SUAutomaticUpdateAlert.xib index 91297175..ad2caf5f 100644 --- a/Sparkle/zh_CN.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/zh_CN.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/zh_CN.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/zh_CN.lproj/SUUpdatePermissionPrompt.xib index 6d82e121..ba1b4ab0 100644 --- a/Sparkle/zh_CN.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/zh_CN.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Sparkle/zh_TW.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/zh_TW.lproj/SUAutomaticUpdateAlert.xib index 737c95b6..ba6f56d8 100644 --- a/Sparkle/zh_TW.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/zh_TW.lproj/SUAutomaticUpdateAlert.xib @@ -6,6 +6,8 @@ + + diff --git a/Sparkle/zh_TW.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/zh_TW.lproj/SUUpdatePermissionPrompt.xib index e821625b..92d677db 100644 --- a/Sparkle/zh_TW.lproj/SUUpdatePermissionPrompt.xib +++ b/Sparkle/zh_TW.lproj/SUUpdatePermissionPrompt.xib @@ -7,6 +7,8 @@ + + diff --git a/Tests/Resources/testappcast.xml b/Tests/Resources/testappcast.xml index 287dbda4..c156b310 100644 --- a/Tests/Resources/testappcast.xml +++ b/Tests/Resources/testappcast.xml @@ -7,6 +7,7 @@ desc Sat, 26 Jul 2014 15:20:11 +0000 + diff --git a/Tests/SUAppcastTest.swift b/Tests/SUAppcastTest.swift index c5250a60..5be4507e 100644 --- a/Tests/SUAppcastTest.swift +++ b/Tests/SUAppcastTest.swift @@ -25,19 +25,23 @@ class SUAppcastTest: XCTestCase { XCTAssertEqual("Version 2.0", items[0].title); XCTAssertEqual("desc", items[0].itemDescription); XCTAssertEqual("Sat, 26 Jul 2014 15:20:11 +0000", items[0].dateString) + XCTAssertTrue(items[0].isCriticalUpdate); // This is the best release matching our system version XCTAssertEqual("Version 3.0", items[1].title); XCTAssertNil(items[1].itemDescription); XCTAssertNil(items[1].dateString) + XCTAssertFalse(items[1].isCriticalUpdate); XCTAssertEqual("Version 4.0", items[2].title); XCTAssertNil(items[2].itemDescription); XCTAssertEqual("Sat, 26 Jul 2014 15:20:13 +0000", items[2].dateString) + XCTAssertFalse(items[2].isCriticalUpdate); XCTAssertEqual("Version 5.0", items[3].title); XCTAssertNil(items[3].itemDescription); XCTAssertNil(items[3].dateString) + XCTAssertFalse(items[3].isCriticalUpdate); // Test best appcast item & a delta update item var deltaItem: SUAppcastItem? = nil diff --git a/fileop/SUFileOperationConstants.m b/fileop/SUFileOperationConstants.m index 5ece5917..7476bd6f 100644 --- a/fileop/SUFileOperationConstants.m +++ b/fileop/SUFileOperationConstants.m @@ -8,6 +8,9 @@ #import "SUFileOperationConstants.h" + +#include "AppKitPrevention.h" + char * const SUFileOpRemoveQuarantineCommand = "xattr-d-apple-quarantine"; char * const SUFileOpCopyCommand = "cp"; char * const SUFileOpMoveCommand = "mv"; diff --git a/fileop/fileop.m b/fileop/fileop.m index 044f2abc..9bb54411 100644 --- a/fileop/fileop.m +++ b/fileop/fileop.m @@ -10,6 +10,9 @@ #import "SUFileManager.h" #import "SUFileOperationConstants.h" + +#include "AppKitPrevention.h" + // If we fail, we exit with a unique status code // We don't try to NSLog because the logs can't be seen anywhere, // and we don't want to log to a file irresponsibly (especially as root),