From 8e37881ed875f4461d88f44bd2f6912b62ab5862 Mon Sep 17 00:00:00 2001 From: Daniel Jalkut Date: Tue, 22 Oct 2019 19:44:06 -0400 Subject: [PATCH] Protect against unrecognized protocol errors when building for MAC_APP_STORE or TEST. --- Mac/AppDelegate.swift | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Mac/AppDelegate.swift b/Mac/AppDelegate.swift index 9e4c8207e..52eedd75e 100644 --- a/Mac/AppDelegate.swift +++ b/Mac/AppDelegate.swift @@ -13,14 +13,21 @@ import RSTree import RSWeb import Account import RSCore -#if !MAC_APP_STORE && !TEST + +// If we're not going to import Sparkle, provide dummy protocols to make it easy +// for AppDelegate to comply +#if MAC_APP_STORE || TEST +protocol SPUStandardUserDriverDelegate {} +protocol SPUUpdaterDelegate {} +#else import Sparkle #endif var appDelegate: AppDelegate! @NSApplicationMain -class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, UNUserNotificationCenterDelegate, UnreadCountProvider, SPUStandardUserDriverDelegate, SPUUpdaterDelegate { +class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, UNUserNotificationCenterDelegate, UnreadCountProvider, SPUStandardUserDriverDelegate, SPUUpdaterDelegate +{ var userNotificationManager: UserNotificationManager! var faviconDownloader: FaviconDownloader!