From 17e3ce9540753e7c5cad29814de815946b78f293 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Sun, 10 Jan 2021 14:41:01 +0100 Subject: [PATCH] Allow full version in beta via scheme Beta was restricted even in development. --- Passepartout/Core/Sources/Model/ProductManager.swift | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Passepartout/Core/Sources/Model/ProductManager.swift b/Passepartout/Core/Sources/Model/ProductManager.swift index 47cefd6a..a77ef476 100644 --- a/Passepartout/Core/Sources/Model/ProductManager.swift +++ b/Passepartout/Core/Sources/Model/ProductManager.swift @@ -160,15 +160,19 @@ public class ProductManager: NSObject { } public func isEligible(forFeature feature: Product) throws -> Bool { - guard !isBeta else { - throw ProductError.beta + if isBeta { + guard cfg.isBetaFullVersion else { + throw ProductError.beta + } } return isFullVersion() || purchasedFeatures.contains(feature) } public func isEligible(forProvider metadata: Infrastructure.Metadata) throws -> Bool { - guard !isBeta else { - throw ProductError.beta + if isBeta { + guard cfg.isBetaFullVersion else { + throw ProductError.beta + } } return isFullVersion() || purchasedFeatures.contains(metadata.product) }