diff --git a/Sparkle/SPUUpdaterDelegate.h b/Sparkle/SPUUpdaterDelegate.h index 84af93635..e3bb0874c 100644 --- a/Sparkle/SPUUpdaterDelegate.h +++ b/Sparkle/SPUUpdaterDelegate.h @@ -386,7 +386,7 @@ SU_EXPORT extern NSString *const SUSystemProfilerPreferredLanguageKey; @param updater The updater instance. @return The custom version comparator or @c nil if you don't want to be delegated this task. */ -- (nullable id)versionComparatorForUpdater:(SPUUpdater *)updater; +- (nullable id)versionComparatorForUpdater:(SPUUpdater *)updater __deprecated_msg("Custom version comparators are deprecated because they are incompatible with how the system compares different versions of an app."); /** Called when a background update will be scheduled after a delay. diff --git a/Sparkle/SUAppcastDriver.m b/Sparkle/SUAppcastDriver.m index 22885e230..9faea12b4 100644 --- a/Sparkle/SUAppcastDriver.m +++ b/Sparkle/SUAppcastDriver.m @@ -429,11 +429,14 @@ + (SUAppcastItem *)bestItemFromAppcastItems:(NSArray *)appcastItems getDeltaItem { id comparator = nil; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" // Give the delegate a chance to provide a custom version comparator id updaterDelegate = _updaterDelegate; if ([updaterDelegate respondsToSelector:@selector((versionComparatorForUpdater:))]) { comparator = [updaterDelegate versionComparatorForUpdater:_updater]; } +#pragma clang diagnostic pop // If we don't get a comparator from the delegate, use the default comparator if (comparator == nil) { diff --git a/Sparkle/SUUpdater.m b/Sparkle/SUUpdater.m index b151c052c..62ee37a56 100644 --- a/Sparkle/SUUpdater.m +++ b/Sparkle/SUUpdater.m @@ -460,6 +460,8 @@ - (void)updaterWillRelaunchApplication:(SPUUpdater *)__unused updater } } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" - (id)versionComparatorForUpdater:(SPUUpdater *)__unused updater { id versionComparator; @@ -468,6 +470,7 @@ - (void)updaterWillRelaunchApplication:(SPUUpdater *)__unused updater } return versionComparator; } +#pragma clang diagnostic pop // Private SPUUpdater API that allows us to defer providing an application path to relaunch - (NSString * _Nullable)_pathToRelaunchForUpdater:(SPUUpdater *)__unused updater