diff --git a/Configurations/ConfigFramework.xcconfig b/Configurations/ConfigFramework.xcconfig index e557f067..32b4478a 100644 --- a/Configurations/ConfigFramework.xcconfig +++ b/Configurations/ConfigFramework.xcconfig @@ -24,3 +24,6 @@ STRINGS_FILE_OUTPUT_ENCODING = binary // with Application Extensions, then we should allow frameworks that require // compatibility to be able to link with us. APPLICATION_EXTENSION_API_ONLY = YES + +ENABLE_MODULE_VERIFIER = YES +MODULEMAP_PRIVATE_FILE = Sparkle/Sparkle.private.modulemap diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index 87d7e335..40687805 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -1093,6 +1093,7 @@ 72316BD11E0DA8430039EFD9 /* SUUnarchiverNotifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SUUnarchiverNotifier.h; path = Autoupdate/SUUnarchiverNotifier.h; sourceTree = SOURCE_ROOT; }; 72316BD21E0DA8430039EFD9 /* SUUnarchiverNotifier.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SUUnarchiverNotifier.m; path = Autoupdate/SUUnarchiverNotifier.m; sourceTree = SOURCE_ROOT; }; 7235B75E29DFC0120081FE4E /* make-xcframework.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "make-xcframework.sh"; sourceTree = ""; }; + 72366CCC2DC2D1FC003CE62B /* Sparkle.private.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = Sparkle.private.modulemap; sourceTree = ""; }; 723ABCD7259A9A9D00BDB4FA /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Sparkle.strings; sourceTree = ""; }; 723ABD37259A9BA500BDB4FA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/SUUpdateAlert.xib; sourceTree = ""; }; 723ABD4C259A9BB900BDB4FA /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/SUUpdateAlert.strings; sourceTree = ""; }; @@ -1845,6 +1846,7 @@ isa = PBXGroup; children = ( 720767D11E2EB86200F9A850 /* AppKitPrevention.h */, + 72366CCC2DC2D1FC003CE62B /* Sparkle.private.modulemap */, 61299B3909CB055000B7442F /* Appcast Support */, 55C14BD5136EEFD000649790 /* Autoupdate */, 72F9EBE41D519425004AC8B6 /* Deprecated */, diff --git a/Sparkle/SPUUpdater.m b/Sparkle/SPUUpdater.m index c549734e..88cf580c 100644 --- a/Sparkle/SPUUpdater.m +++ b/Sparkle/SPUUpdater.m @@ -1094,12 +1094,17 @@ static NSString *escapeURLComponent(NSString *str) { BOOL sendingSystemProfile = [self sendsSystemProfile]; // Let's only send the system profiling information once per week at most, so we normalize daily-checkers vs. biweekly-checkers and the such. - NSDate *lastSubmitDate = [_host objectForUserDefaultsKey:SULastProfileSubmitDateKey]; - if (!lastSubmitDate) { - lastSubmitDate = [NSDate distantPast]; + if (sendingSystemProfile) { + NSDate *lastSubmitDate = [_host objectForUserDefaultsKey:SULastProfileSubmitDateKey]; + if (!lastSubmitDate) { + lastSubmitDate = [NSDate distantPast]; + } + const NSTimeInterval oneWeek = 60 * 60 * 24 * 7; + NSTimeInterval timeSinceLastSubmission = [lastSubmitDate timeIntervalSinceNow] * -1; + if (timeSinceLastSubmission < oneWeek) { + sendingSystemProfile = NO; + } } - const NSTimeInterval oneWeek = 60 * 60 * 24 * 7; - sendingSystemProfile &= (-[lastSubmitDate timeIntervalSinceNow] >= oneWeek); id delegate = _delegate; NSArray *> *parameters = @[]; diff --git a/Sparkle/Sparkle.private.modulemap b/Sparkle/Sparkle.private.modulemap new file mode 100644 index 00000000..8bc5cfd1 --- /dev/null +++ b/Sparkle/Sparkle.private.modulemap @@ -0,0 +1,38 @@ +// +// Sparkle.private.modulemap +// Sparkle +// +// Created on 4/30/25. +// Copyright © 2025 Sparkle Project. All rights reserved. +// + +framework module Sparkle_Private { + // Nothing exported here +} + +explicit module Sparkle_Private.SPUStandardUserDriver { + header "SPUStandardUserDriver+Private.h" + export * +} + +explicit module Sparkle_Private.SPUGentleUserDriverReminders { + header "SPUGentleUserDriverReminders.h" + export * +} + +explicit module Sparkle_Private.SPUUserAgent { + header "SPUUserAgent+Private.h" + export * +} + +explicit module Sparkle_Private.SUAppcastItem { + header "SUAppcastItem+Private.h" + header "SPUAppcastItemStateResolver.h" + export * +} + +explicit module Sparkle_Private.SUInstallerLauncher { + header "SUInstallerLauncher+Private.h" + header "SPUInstallationType.h" + export * +}