Suppress the permissions dialog on every launch of the debug app by not accessing the app group container. Document the define so that people know to disable to debug extensions.

This commit is contained in:
Brent Simmons committed 2026-01-05 12:05:35 -08:00
1 parent 70ba8a1659
commit 85f31d0265
3 files changed
+20 -4

No files matched your search

+3
View File
@@ -200,8 +200,11 @@ let appName = "NetNewsWire"
ArticleThemesManager.shared.start()
NetworkMonitor.shared.start()
#if !SKIP_APP_GROUP_ACCESS
ExtensionContainersFile.shared.start()
ExtensionFeedAddRequestFile.shared.start()
#endif
refreshTimer = AccountRefreshTimer()
ArticleStatusSyncTimer.shared.start()
+7
View File
@@ -95,8 +95,11 @@ import Secrets
ArticleThemesManager.shared.start()
NetworkMonitor.shared.start()
#if !SKIP_APP_GROUP_ACCESS
ExtensionContainersFile.shared.start()
ExtensionFeedAddRequestFile.shared.start()
#endif
#if DEBUG
ArticleStatusSyncTimer.shared.update()
@@ -160,7 +163,11 @@ import Secrets
func prepareAccountsForBackground() {
updateBadge()
#if !SKIP_APP_GROUP_ACCESS
ExtensionFeedAddRequestFile.shared.suspend()
#endif
ArticleStatusSyncTimer.shared.invalidate()
scheduleBackgroundFeedRefresh()
syncArticleStatus()
+10 -4
View File
@@ -1,14 +1,20 @@
#include "./NetNewsWire_project.xcconfig"
#include "./common/NetNewsWire_debug_identifiers.xcconfig"
// The SKIP_APP_GROUP_ACCESS definition suppresses app group permission dialogs
// on every launch of the debug build — at the cost of extensions not working
// as expected. To debug extensions, temporarily remove the instances
// of SKIP_APP_GROUP_ACCESS below. You will get a permissions dialog on every
// launch, which is annoying, but it will allow extensions to be debugged.
// Be sure to discard your change; do not commit it.
DEBUG_INFORMATION_FORMAT = dwarf
ENABLE_TESTABILITY = YES
GCC_DYNAMIC_NO_PIC = NO
GCC_OPTIMIZATION_LEVEL = 0
GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 $(inherited)
GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 SKIP_APP_GROUP_ACCESS=1 $(inherited)
MTL_ENABLE_DEBUG_INFO = YES
ONLY_ACTIVE_ARCH = YES
OTHER_SWIFT_FLAGS = -DDEBUG
OTHER_SWIFT_FLAGS = -DDEBUG -DSKIP_APP_GROUP_ACCESS
SWIFT_OPTIMIZATION_LEVEL = -Onone
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG SKIP_APP_GROUP_ACCESS