mirror of
https://github.com/confirmedcode/Lockdown-iOS.git
synced 2025-12-21 12:14:02 +01:00
35 lines
901 B
Swift
35 lines
901 B
Swift
//
|
|
// AppStoreProductGroup.swift
|
|
// Lockdown
|
|
//
|
|
// Created by Alexander Parshakov on 11/10/22
|
|
// Copyright © 2022 Confirmed Inc. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import UIKit
|
|
|
|
enum AppStoreProductGroup: Int, CaseIterable {
|
|
case firewallAndVpn
|
|
case pro
|
|
|
|
func hasFeature(_ feature: PaywallTableFeature) -> Bool {
|
|
switch self {
|
|
case .firewallAndVpn:
|
|
return [
|
|
.stopsAdsAndTrackers,
|
|
.blocksBadware,
|
|
.accessCuratedBlockLists,
|
|
.buildCustomBlockLists,
|
|
.stopsBrowsingHistoryTracking,
|
|
.anonymizingBrowsing,
|
|
.hidesLocation,
|
|
.letsYouChangeIP,
|
|
.appForPhoneAndIpad
|
|
].contains(feature)
|
|
case .pro:
|
|
return [PaywallTableFeature].allDefaultFeatures.contains(feature)
|
|
}
|
|
}
|
|
}
|