diff --git a/Autoupdate/SPUInstallationInfo.m b/Autoupdate/SPUInstallationInfo.m index 1b76f5af..ef7fdb38 100644 --- a/Autoupdate/SPUInstallationInfo.m +++ b/Autoupdate/SPUInstallationInfo.m @@ -9,6 +9,10 @@ #import "SPUInstallationInfo.h" #import "SUAppcastItem.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + static NSString *SUAppcastItemKey = @"SUAppcastItem"; static NSString *SUCanSilentlyInstallKey = @"SUCanSilentlyInstall"; diff --git a/Autoupdate/SPUInstallerValidation.m b/Autoupdate/SPUInstallerValidation.m index e3aa814e..e15633e2 100644 --- a/Autoupdate/SPUInstallerValidation.m +++ b/Autoupdate/SPUInstallerValidation.m @@ -12,6 +12,10 @@ #import "SUDSAVerifier.h" #import "SUCodeSigningVerifier.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + @implementation SPUInstallerValidation + (BOOL)validateBundleUpdateForHost:(SUHost *)host newBundlePath:(NSString *)newBundlePath archivePath:(NSString *)archivePath DSASignature:(NSString *)DSASignature diff --git a/Autoupdate/SPUMessageTypes.m b/Autoupdate/SPUMessageTypes.m index bf51e192..34f88328 100644 --- a/Autoupdate/SPUMessageTypes.m +++ b/Autoupdate/SPUMessageTypes.m @@ -9,6 +9,10 @@ #import "SPUMessageTypes.h" #import "SUHost.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + NSString *SPUAppcastItemArchiveKey = @"SPUAppcastItemArchive"; // Tags added to the bundle identifier which is used as Mach service names diff --git a/Autoupdate/main.m b/Autoupdate/main.m index e41c19c5..9ca99024 100644 --- a/Autoupdate/main.m +++ b/Autoupdate/main.m @@ -1,6 +1,10 @@ #import #import "AppInstaller.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + int main(int __unused argc, const char __unused *argv[]) { @autoreleasepool diff --git a/InstallerConnection/SUInstallerConnection.m b/InstallerConnection/SUInstallerConnection.m index 30ebc6a3..d0ade57b 100644 --- a/InstallerConnection/SUInstallerConnection.m +++ b/InstallerConnection/SUInstallerConnection.m @@ -9,6 +9,10 @@ #import "SUInstallerConnection.h" #import "SPUSystemAuthorization.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + static NSString *SUInstallerConnectionKeepAliveReason = @"Installer Connection Keep Alive"; @interface SUInstallerConnection () diff --git a/InstallerConnection/SUXPCInstallerConnection.m b/InstallerConnection/SUXPCInstallerConnection.m index ae04b223..36281cb1 100644 --- a/InstallerConnection/SUXPCInstallerConnection.m +++ b/InstallerConnection/SUXPCInstallerConnection.m @@ -8,6 +8,10 @@ #import "SUXPCInstallerConnection.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + @interface SUXPCInstallerConnection () @property (nonatomic) NSXPCConnection *connection; diff --git a/InstallerConnection/main.m b/InstallerConnection/main.m index 9a82857e..59e12d56 100644 --- a/InstallerConnection/main.m +++ b/InstallerConnection/main.m @@ -10,6 +10,10 @@ #import "SUInstallerConnection.h" #import "SUInstallerCommunicationProtocol.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + @interface ServiceDelegate : NSObject @end diff --git a/InstallerStatus/SUInstallerStatus.m b/InstallerStatus/SUInstallerStatus.m index 0961d991..93d988d9 100644 --- a/InstallerStatus/SUInstallerStatus.m +++ b/InstallerStatus/SUInstallerStatus.m @@ -9,6 +9,10 @@ #import "SUInstallerStatus.h" #import "SPUSystemAuthorization.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + @interface SUInstallerStatus () @property (nonatomic, copy) void (^invalidationBlock)(void); diff --git a/InstallerStatus/SUXPCInstallerStatus.m b/InstallerStatus/SUXPCInstallerStatus.m index 4866281f..aec4b3bb 100644 --- a/InstallerStatus/SUXPCInstallerStatus.m +++ b/InstallerStatus/SUXPCInstallerStatus.m @@ -8,6 +8,10 @@ #import "SUXPCInstallerStatus.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + @interface SUXPCInstallerStatus () @property (nonatomic) NSXPCConnection *connection; diff --git a/InstallerStatus/main.m b/InstallerStatus/main.m index ef27775b..d508428e 100644 --- a/InstallerStatus/main.m +++ b/InstallerStatus/main.m @@ -9,6 +9,10 @@ #import #import "SUInstallerStatus.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + @interface ServiceDelegate : NSObject @end diff --git a/PersistentDownloader/SUPersistentDownloader.m b/PersistentDownloader/SUPersistentDownloader.m index 8fe6ca63..6fd154b2 100644 --- a/PersistentDownloader/SUPersistentDownloader.m +++ b/PersistentDownloader/SUPersistentDownloader.m @@ -12,6 +12,10 @@ #import "SPUURLRequest.h" #import "SUErrors.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + static NSString *SUPersistentDownloadingReason = @"Downloading persistent file"; @interface SUPersistentDownloader () diff --git a/Sparkle/SPUDownloadData.m b/Sparkle/SPUDownloadData.m index cf97cf8e..b183aefd 100644 --- a/Sparkle/SPUDownloadData.m +++ b/Sparkle/SPUDownloadData.m @@ -8,6 +8,10 @@ #import "SPUDownloadData.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + static NSString *SPUDownloadDataKey = @"SPUDownloadData"; static NSString *SPUDownloadTextEncodingKey = @"SPUDownloadTextEncoding"; static NSString *SPUDownloadMIMETypeKey = @"SPUDownloadMIMEType"; diff --git a/Sparkle/SPULocalCacheDirectory.m b/Sparkle/SPULocalCacheDirectory.m index d126972d..ebfac286 100644 --- a/Sparkle/SPULocalCacheDirectory.m +++ b/Sparkle/SPULocalCacheDirectory.m @@ -9,6 +9,10 @@ #import "SPULocalCacheDirectory.h" #import "SULog.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + static NSTimeInterval OLD_ITEM_DELETION_INTERVAL = 86400 * 10; // 10 days @implementation SPULocalCacheDirectory diff --git a/Sparkle/SPUSecureCoding.m b/Sparkle/SPUSecureCoding.m index 157ef27b..a4816e30 100644 --- a/Sparkle/SPUSecureCoding.m +++ b/Sparkle/SPUSecureCoding.m @@ -9,6 +9,10 @@ #import "SPUSecureCoding.h" #import "SULog.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + static NSString *SURootObjectArchiveKey = @"SURootObjectArchive"; NSData * _Nullable SPUArchiveRootObjectSecurely(id rootObject) diff --git a/Sparkle/SPUSystemAuthorization.m b/Sparkle/SPUSystemAuthorization.m index fa90d1b6..237d09c6 100644 --- a/Sparkle/SPUSystemAuthorization.m +++ b/Sparkle/SPUSystemAuthorization.m @@ -10,6 +10,10 @@ #import "SPUInstallationType.h" #import "SUFileManager.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + BOOL SPUNeedsSystemAuthorizationAccess(NSString *path, NSString *installationType) { BOOL needsAuthorization; diff --git a/Sparkle/SPUURLDownload.m b/Sparkle/SPUURLDownload.m index 7a2a6cfa..2bcf74ed 100644 --- a/Sparkle/SPUURLDownload.m +++ b/Sparkle/SPUURLDownload.m @@ -14,6 +14,10 @@ #import "SPUDownloadData.h" #import "SUErrors.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + void SPUDownloadURLWithRequest(NSURLRequest * request, void (^completionBlock)(SPUDownloadData * _Nullable, NSError * _Nullable)) { id downloader = nil; diff --git a/Sparkle/SPUURLRequest.m b/Sparkle/SPUURLRequest.m index f5b789f3..2da23b14 100644 --- a/Sparkle/SPUURLRequest.m +++ b/Sparkle/SPUURLRequest.m @@ -8,6 +8,10 @@ #import "SPUURLRequest.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + static NSString *SPUURLRequestURLKey = @"SPUURLRequestURL"; static NSString *SPUURLRequestCachePolicyKey = @"SPUURLRequestCachePolicy"; static NSString *SPUURLRequestTimeoutIntervalKey = @"SPUURLRequestTimeoutInterval"; diff --git a/Sparkle/SPUUpdaterTimer.m b/Sparkle/SPUUpdaterTimer.m index 781154ea..ebecbdb4 100644 --- a/Sparkle/SPUUpdaterTimer.m +++ b/Sparkle/SPUUpdaterTimer.m @@ -8,6 +8,10 @@ #import "SPUUpdaterTimer.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + @interface SPUUpdaterTimer () @property (nonatomic, readonly, weak) id delegate; diff --git a/Sparkle/SPUXPCServiceInfo.m b/Sparkle/SPUXPCServiceInfo.m index 3d0cc5a1..774ad6e1 100644 --- a/Sparkle/SPUXPCServiceInfo.m +++ b/Sparkle/SPUXPCServiceInfo.m @@ -8,6 +8,10 @@ #import "SPUXPCServiceInfo.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + BOOL SPUXPCServiceExists(NSString *bundleName) { NSBundle *xpcBundle = SPUXPCServiceBundle(bundleName); diff --git a/Sparkle/SUBasicUpdateDriver.m b/Sparkle/SUBasicUpdateDriver.m index bbf4c3d8..02250f1c 100644 --- a/Sparkle/SUBasicUpdateDriver.m +++ b/Sparkle/SUBasicUpdateDriver.m @@ -18,6 +18,10 @@ #import "SPUInstallationInfo.h" #import "SUDownloadedUpdate.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + @interface SUBasicUpdateDriver () @property (nonatomic, weak, readonly) id delegate; diff --git a/Sparkle/SUDownloadedUpdate.m b/Sparkle/SUDownloadedUpdate.m index 2d7577bb..954fb90a 100644 --- a/Sparkle/SUDownloadedUpdate.m +++ b/Sparkle/SUDownloadedUpdate.m @@ -8,6 +8,10 @@ #import "SUDownloadedUpdate.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + @implementation SUDownloadedUpdate @synthesize updateItem = _updateItem; diff --git a/Sparkle/SUProbeInstallStatus.m b/Sparkle/SUProbeInstallStatus.m index 5b2b7f5e..d186d961 100644 --- a/Sparkle/SUProbeInstallStatus.m +++ b/Sparkle/SUProbeInstallStatus.m @@ -15,6 +15,10 @@ #import "SUXPCInstallerStatus.h" #import "SULog.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + // This timeout is if probing the installer takes too long // It should be at least more than 1 second since a probe can take around that much time #define PROBE_TIMEOUT 7 diff --git a/TemporaryDownloader/SUTemporaryDownloader.m b/TemporaryDownloader/SUTemporaryDownloader.m index d94c241f..139cefb5 100644 --- a/TemporaryDownloader/SUTemporaryDownloader.m +++ b/TemporaryDownloader/SUTemporaryDownloader.m @@ -12,6 +12,10 @@ #import "SUErrors.h" #import "SUConstants.h" +#ifdef _APPKITDEFINES_H +#error This is a "core" class and should NOT import AppKit +#endif + @interface SUTemporaryDownloader () @property (nonatomic, copy) void (^completionBlock)(SPUDownloadData * _Nullable downloadData, NSError * _Nullable error);