kiwix-apple/Model/Utilities/FeatureFlags.swift
2025-05-26 22:23:04 +02:00

42 lines
1.5 KiB
Swift

// This file is part of Kiwix for iOS & macOS.
//
// Kiwix is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// any later version.
//
// Kiwix is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kiwix; If not, see https://www.gnu.org/licenses/.
import Foundation
enum FeatureFlags {
public static func isUITesting() -> Bool {
#if DEBUG
ProcessInfo.processInfo.arguments.contains("ui_testing")
#else
false
#endif
}
#if DEBUG
static let wikipediaDarkUserCSS: Bool = true
static let map: Bool = true
#else
static let wikipediaDarkUserCSS: Bool = false
static let map: Bool = false
#endif
/// Custom apps, which have a bundled zim file, do not require library access
/// this will remove all library related features
static let hasLibrary: Bool = !AppType.isCustom
static let showExternalLinkOptionInSettings: Bool = Config.value(for: .showExternalLinkSettings) ?? true
static let showSearchSnippetInSettings: Bool = Config.value(for: .showSearchSnippetInSettings) ?? true
}