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 githubSponsors: URL
public let eula: URL
}
public struct Emails: Decodable, Sendable {

View File

@ -11,7 +11,8 @@
"websites": {
"home": "https://passepartoutvpn.app",
"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": {
"domain": "passepartoutvpn.app",

View File

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

View File

@ -89,6 +89,7 @@ private extension PaywallView {
requiredFeaturesView
featureProductsView
fullProductsView
linksView
if !iapManager.isFullVersionPurchaser {
allFeaturesView
}
@ -127,21 +128,32 @@ private extension PaywallView {
}
var fullProductsView: some View {
fullIAPs.nilIfEmpty.map {
ForEach($0, id: \.productIdentifier) {
PaywallProductView(
iapManager: iapManager,
style: .paywall,
product: $0,
purchasingIdentifier: $purchasingIdentifier,
onComplete: onComplete,
onError: onError
)
fullIAPs.nilIfEmpty.map { iaps in
Group {
ForEach(iaps, id: \.productIdentifier) {
PaywallProductView(
iapManager: iapManager,
style: .paywall,
product: $0,
purchasingIdentifier: $purchasingIdentifier,
onComplete: onComplete,
onError: onError
)
}
}
.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 {
FeatureListView(
style: allFeaturesStyle,