Allow full version in beta via scheme

Beta was restricted even in development.
This commit is contained in:
Davide De Rosa 2021-01-10 14:41:01 +01:00
parent 81bc2a7ebd
commit 17e3ce9540
1 changed files with 8 additions and 4 deletions

View File

@ -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)
}