From e80a5f92bb5be686d7fc830dfa156e12cb2baa68 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Tue, 22 Oct 2019 16:42:17 -0500 Subject: [PATCH] Readd the SUUpdater code --- Mac/AppDelegate.swift | 7 +++++++ xcconfig/NetNewsWire_project_test.xcconfig | 1 + 2 files changed, 8 insertions(+) diff --git a/Mac/AppDelegate.swift b/Mac/AppDelegate.swift index 4a2002597..117285763 100644 --- a/Mac/AppDelegate.swift +++ b/Mac/AppDelegate.swift @@ -13,6 +13,9 @@ import RSTree import RSWeb import Account import RSCore +#if TEST +import Sparkle +#endif var appDelegate: AppDelegate! @@ -114,6 +117,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, func applicationWillFinishLaunching(_ notification: Notification) { installAppleEventHandlers() + #if TEST + // Don't prompt for updates while running automated tests + SUUpdater.shared()?.automaticallyChecksForUpdates = false + #endif } func applicationDidFinishLaunching(_ note: Notification) { diff --git a/xcconfig/NetNewsWire_project_test.xcconfig b/xcconfig/NetNewsWire_project_test.xcconfig index ad10a9ae1..fa08e7ae8 100644 --- a/xcconfig/NetNewsWire_project_test.xcconfig +++ b/xcconfig/NetNewsWire_project_test.xcconfig @@ -1,3 +1,4 @@ #include "./NetNewsWire_project_debug.xcconfig" OTHER_SWIFT_FLAGS = -DTEST $(inherited) +FRAMEWORK_SEARCH_PATHS = $(inherited) $(SYMROOT)/Release$(EFFECTIVE_PLATFORM_NAME)