Add EULA and privacy policy in paywall (#1056)

Follow-up from App Review.
This commit is contained in:
Davide 2025-01-13 18:21:33 +01:00 committed by GitHub
parent a0092b3fad
commit 4a236787bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 28 additions and 11 deletions

View File

@ -65,6 +65,8 @@ public struct Constants: Decodable, Sendable {
public let subreddit: URL public let subreddit: URL
public let githubSponsors: URL public let githubSponsors: URL
public let eula: URL
} }
public struct Emails: Decodable, Sendable { public struct Emails: Decodable, Sendable {

View File

@ -11,7 +11,8 @@
"websites": { "websites": {
"home": "https://passepartoutvpn.app", "home": "https://passepartoutvpn.app",
"subreddit": "https://www.reddit.com/r/passepartout/", "subreddit": "https://www.reddit.com/r/passepartout/",
"githubSponsors": "https://www.github.com/sponsors/passepartoutvpn" "githubSponsors": "https://www.github.com/sponsors/passepartoutvpn",
"eula": "https://www.apple.com/legal/internet-services/itunes/dev/stdeula/"
}, },
"emails": { "emails": {
"domain": "passepartoutvpn.app", "domain": "passepartoutvpn.app",

View File

@ -108,6 +108,8 @@ extension Strings {
public static let dns = "DNS" public static let dns = "DNS"
public static let eula = "EULA"
public static let faq = "FAQ" public static let faq = "FAQ"
public static let http = "HTTP" public static let http = "HTTP"

View File

@ -89,6 +89,7 @@ private extension PaywallView {
requiredFeaturesView requiredFeaturesView
featureProductsView featureProductsView
fullProductsView fullProductsView
linksView
if !iapManager.isFullVersionPurchaser { if !iapManager.isFullVersionPurchaser {
allFeaturesView allFeaturesView
} }
@ -127,21 +128,32 @@ private extension PaywallView {
} }
var fullProductsView: some View { var fullProductsView: some View {
fullIAPs.nilIfEmpty.map { fullIAPs.nilIfEmpty.map { iaps in
ForEach($0, id: \.productIdentifier) { Group {
PaywallProductView( ForEach(iaps, id: \.productIdentifier) {
iapManager: iapManager, PaywallProductView(
style: .paywall, iapManager: iapManager,
product: $0, style: .paywall,
purchasingIdentifier: $purchasingIdentifier, product: $0,
onComplete: onComplete, purchasingIdentifier: $purchasingIdentifier,
onError: onError onComplete: onComplete,
) onError: onError
)
}
} }
.themeSection(header: Strings.Views.Paywall.Sections.FullProducts.header) .themeSection(header: Strings.Views.Paywall.Sections.FullProducts.header)
} }
} }
var linksView: some View {
fullIAPs.nilIfEmpty.map { _ in
Section {
Link(Strings.Unlocalized.eula, destination: Constants.shared.websites.eula)
Link(Strings.Views.About.Links.Rows.privacyPolicy, destination: Constants.shared.websites.privacyPolicy)
}
}
}
var allFeaturesView: some View { var allFeaturesView: some View {
FeatureListView( FeatureListView(
style: allFeaturesStyle, style: allFeaturesStyle,