From 3e48ee91ef7cb9acb17318a2a43d1385926a844b Mon Sep 17 00:00:00 2001 From: Davide Date: Mon, 3 Feb 2025 10:17:53 +0100 Subject: [PATCH 1/5] Always show TOS links --- .../UILibrary/Views/Paywall/PaywallView.swift | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Packages/App/Sources/UILibrary/Views/Paywall/PaywallView.swift b/Packages/App/Sources/UILibrary/Views/Paywall/PaywallView.swift index ebf85653f..a97b9ae4a 100644 --- a/Packages/App/Sources/UILibrary/Views/Paywall/PaywallView.swift +++ b/Packages/App/Sources/UILibrary/Views/Paywall/PaywallView.swift @@ -143,16 +143,18 @@ private extension PaywallView { ) } } - .themeSection(header: Strings.Views.Paywall.Sections.FullProducts.header) + .themeSection( + header: Strings.Views.Paywall.Sections.FullProducts.header, + footer: Strings.Views.Paywall.Sections.Products.footer, + forcesFooter: true + ) } } 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) - } + Section { + Link(Strings.Unlocalized.eula, destination: Constants.shared.websites.eula) + Link(Strings.Views.About.Links.Rows.privacyPolicy, destination: Constants.shared.websites.privacyPolicy) } } From 7346603125201b6fa0afd0e266374202d5c60cb8 Mon Sep 17 00:00:00 2001 From: Davide Date: Mon, 3 Feb 2025 10:18:15 +0100 Subject: [PATCH 2/5] Reuse .hasProducts logic --- .../App/Sources/UILibrary/Views/Paywall/PaywallView.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Packages/App/Sources/UILibrary/Views/Paywall/PaywallView.swift b/Packages/App/Sources/UILibrary/Views/Paywall/PaywallView.swift index a97b9ae4a..3441148c1 100644 --- a/Packages/App/Sources/UILibrary/Views/Paywall/PaywallView.swift +++ b/Packages/App/Sources/UILibrary/Views/Paywall/PaywallView.swift @@ -217,6 +217,10 @@ private extension PaywallView { AppProduct.Full.OneTime.allFeatures.features } + var hasProducts: Bool { + !featureIAPs.isEmpty || !fullIAPs.isEmpty + } + func fetchAvailableProducts() async { isFetchingProducts = true defer { @@ -246,7 +250,7 @@ private extension PaywallView { pp_log(.App.iap, .info, "Suggested products: \(suggestedProducts)") pp_log(.App.iap, .info, "\tFeatures: \(featureIAPs)") pp_log(.App.iap, .info, "\tFull version: \(fullIAPs)") - guard !(featureIAPs + fullIAPs).isEmpty else { + guard hasProducts else { throw AppError.emptyProducts } From e815836235f1f39b9729a3db3925ff24294705c5 Mon Sep 17 00:00:00 2001 From: Davide Date: Mon, 3 Feb 2025 10:18:25 +0100 Subject: [PATCH 3/5] Mention that all purchases support Family Sharing --- Packages/App/Sources/UILibrary/L10n/SwiftGen+Strings.swift | 4 ++++ .../UILibrary/Resources/en.lproj/Localizable.strings | 1 + .../App/Sources/UILibrary/Views/Paywall/PaywallView.swift | 6 +++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Packages/App/Sources/UILibrary/L10n/SwiftGen+Strings.swift b/Packages/App/Sources/UILibrary/L10n/SwiftGen+Strings.swift index 517158cb7..a97673991 100644 --- a/Packages/App/Sources/UILibrary/L10n/SwiftGen+Strings.swift +++ b/Packages/App/Sources/UILibrary/L10n/SwiftGen+Strings.swift @@ -771,6 +771,10 @@ public enum Strings { /// Full version public static let header = Strings.tr("Localizable", "views.paywall.sections.full_products.header", fallback: "Full version") } + public enum Products { + /// All purchases support Family Sharing. + public static let footer = Strings.tr("Localizable", "views.paywall.sections.products.footer", fallback: "All purchases support Family Sharing.") + } public enum RequiredFeatures { /// Required features public static let header = Strings.tr("Localizable", "views.paywall.sections.required_features.header", fallback: "Required features") diff --git a/Packages/App/Sources/UILibrary/Resources/en.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/en.lproj/Localizable.strings index 4f0490c88..475d5e321 100644 --- a/Packages/App/Sources/UILibrary/Resources/en.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/en.lproj/Localizable.strings @@ -81,6 +81,7 @@ "views.paywall.sections.required_features.header" = "Required features"; "views.paywall.sections.full_products.header" = "Full version"; "views.paywall.sections.all_features.header" = "Full version includes"; +"views.paywall.sections.products.footer" = "All purchases support Family Sharing."; "views.paywall.sections.restore.header" = "Restore"; "views.paywall.sections.restore.footer" = "If you bought this app or feature in the past, you can restore your purchases."; "views.paywall.rows.restore_purchases" = "Restore purchases"; diff --git a/Packages/App/Sources/UILibrary/Views/Paywall/PaywallView.swift b/Packages/App/Sources/UILibrary/Views/Paywall/PaywallView.swift index 3441148c1..9b36ebf98 100644 --- a/Packages/App/Sources/UILibrary/Views/Paywall/PaywallView.swift +++ b/Packages/App/Sources/UILibrary/Views/Paywall/PaywallView.swift @@ -125,7 +125,11 @@ private extension PaywallView { onError: onError ) } - .themeSection(header: Strings.Global.Nouns.products) + .themeSection( + header: Strings.Global.Nouns.products, + footer: Strings.Views.Paywall.Sections.Products.footer, + forcesFooter: true + ) } } From d41f6ca81b0e44e071665b6ac5a9068a4c0ffc8e Mon Sep 17 00:00:00 2001 From: Davide Date: Mon, 3 Feb 2025 10:20:16 +0100 Subject: [PATCH 4/5] Add translations --- .../App/Sources/UILibrary/Resources/de.lproj/Localizable.strings | 1 + .../App/Sources/UILibrary/Resources/el.lproj/Localizable.strings | 1 + .../App/Sources/UILibrary/Resources/es.lproj/Localizable.strings | 1 + .../App/Sources/UILibrary/Resources/fr.lproj/Localizable.strings | 1 + .../App/Sources/UILibrary/Resources/it.lproj/Localizable.strings | 1 + .../App/Sources/UILibrary/Resources/nl.lproj/Localizable.strings | 1 + .../App/Sources/UILibrary/Resources/pl.lproj/Localizable.strings | 1 + .../App/Sources/UILibrary/Resources/pt.lproj/Localizable.strings | 1 + .../App/Sources/UILibrary/Resources/ru.lproj/Localizable.strings | 1 + .../App/Sources/UILibrary/Resources/sv.lproj/Localizable.strings | 1 + .../App/Sources/UILibrary/Resources/uk.lproj/Localizable.strings | 1 + .../UILibrary/Resources/zh-Hans.lproj/Localizable.strings | 1 + 12 files changed, 12 insertions(+) diff --git a/Packages/App/Sources/UILibrary/Resources/de.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/de.lproj/Localizable.strings index 77e66732b..e0681e439 100644 --- a/Packages/App/Sources/UILibrary/Resources/de.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/de.lproj/Localizable.strings @@ -253,6 +253,7 @@ "views.paywall.rows.restore_purchases" = "Käufe wiederherstellen"; "views.paywall.sections.all_features.header" = "Die Vollversion enthält"; "views.paywall.sections.full_products.header" = "Vollversion"; +"views.paywall.sections.products.footer" = "Alle Käufe unterstützen die Familienfreigabe."; "views.paywall.sections.required_features.header" = "Erforderliche Funktionen"; "views.paywall.sections.restore.footer" = "Wenn du diese App oder Funktion in der Vergangenheit gekauft hast, kannst du deine Käufe wiederherstellen."; "views.paywall.sections.restore.header" = "Wiederherstellen"; diff --git a/Packages/App/Sources/UILibrary/Resources/el.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/el.lproj/Localizable.strings index 2f639bda9..4054144c7 100644 --- a/Packages/App/Sources/UILibrary/Resources/el.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/el.lproj/Localizable.strings @@ -253,6 +253,7 @@ "views.paywall.rows.restore_purchases" = "Επαναφορά αγορών"; "views.paywall.sections.all_features.header" = "Η πλήρης έκδοση περιλαμβάνει"; "views.paywall.sections.full_products.header" = "Πλήρης έκδοση"; +"views.paywall.sections.products.footer" = "Όλες οι αγορές υποστηρίζουν την Οικογενειακή Κοινή Χρήση."; "views.paywall.sections.required_features.header" = "Απαιτούμενες λειτουργίες"; "views.paywall.sections.restore.footer" = "Εάν αγοράσατε αυτήν την εφαρμογή ή λειτουργία στο παρελθόν, μπορείτε να επαναφέρετε τις αγορές σας."; "views.paywall.sections.restore.header" = "Επαναφορά"; diff --git a/Packages/App/Sources/UILibrary/Resources/es.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/es.lproj/Localizable.strings index 3feb87f64..58cae0433 100644 --- a/Packages/App/Sources/UILibrary/Resources/es.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/es.lproj/Localizable.strings @@ -253,6 +253,7 @@ "views.paywall.rows.restore_purchases" = "Restaurar compras"; "views.paywall.sections.all_features.header" = "La versión completa incluye"; "views.paywall.sections.full_products.header" = "Versión completa"; +"views.paywall.sections.products.footer" = "Todas las compras admiten En Familia."; "views.paywall.sections.required_features.header" = "Características requeridas"; "views.paywall.sections.restore.footer" = "Si compraste esta app o característica en el pasado, puedes restaurar tus compras."; "views.paywall.sections.restore.header" = "Restaurar"; diff --git a/Packages/App/Sources/UILibrary/Resources/fr.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/fr.lproj/Localizable.strings index 84e70fcbc..0803e65cd 100644 --- a/Packages/App/Sources/UILibrary/Resources/fr.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/fr.lproj/Localizable.strings @@ -253,6 +253,7 @@ "views.paywall.rows.restore_purchases" = "Restaurer les achats"; "views.paywall.sections.all_features.header" = "La version complète inclut"; "views.paywall.sections.full_products.header" = "Version complète"; +"views.paywall.sections.products.footer" = "Tous les achats prennent en charge le Partage familial."; "views.paywall.sections.required_features.header" = "Fonctionnalités requises"; "views.paywall.sections.restore.footer" = "Si vous avez acheté cette application ou cette fonctionnalité dans le passé, vous pouvez restaurer vos achats."; "views.paywall.sections.restore.header" = "Restaurer"; diff --git a/Packages/App/Sources/UILibrary/Resources/it.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/it.lproj/Localizable.strings index 2304713c0..709a33c07 100644 --- a/Packages/App/Sources/UILibrary/Resources/it.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/it.lproj/Localizable.strings @@ -253,6 +253,7 @@ "views.paywall.rows.restore_purchases" = "Ripristina acquisti"; "views.paywall.sections.all_features.header" = "La versione completa include"; "views.paywall.sections.full_products.header" = "Versione completa"; +"views.paywall.sections.products.footer" = "Tutti gli acquisti supportano “In famiglia”."; "views.paywall.sections.required_features.header" = "Funzionalità richieste"; "views.paywall.sections.restore.footer" = "Se hai acquistato questa app o funzionalità in passato, puoi ripristinare i tuoi acquisti."; "views.paywall.sections.restore.header" = "Ripristina"; diff --git a/Packages/App/Sources/UILibrary/Resources/nl.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/nl.lproj/Localizable.strings index aafd82037..bb64d6aa9 100644 --- a/Packages/App/Sources/UILibrary/Resources/nl.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/nl.lproj/Localizable.strings @@ -253,6 +253,7 @@ "views.paywall.rows.restore_purchases" = "Aankopen herstellen"; "views.paywall.sections.all_features.header" = "De volledige versie bevat"; "views.paywall.sections.full_products.header" = "Volledige versie"; +"views.paywall.sections.products.footer" = "Alle aankopen ondersteunen Delen met gezin."; "views.paywall.sections.required_features.header" = "Vereiste functies"; "views.paywall.sections.restore.footer" = "Als je deze app of functie eerder hebt gekocht, kun je je aankopen herstellen."; "views.paywall.sections.restore.header" = "Herstellen"; diff --git a/Packages/App/Sources/UILibrary/Resources/pl.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/pl.lproj/Localizable.strings index db84c3d23..c50f84de8 100644 --- a/Packages/App/Sources/UILibrary/Resources/pl.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/pl.lproj/Localizable.strings @@ -253,6 +253,7 @@ "views.paywall.rows.restore_purchases" = "Przywróć zakupy"; "views.paywall.sections.all_features.header" = "Pełna wersja zawiera"; "views.paywall.sections.full_products.header" = "Pełna wersja"; +"views.paywall.sections.products.footer" = "Wszystkie zakupy obsługują Chmurę rodzinną."; "views.paywall.sections.required_features.header" = "Wymagane funkcje"; "views.paywall.sections.restore.footer" = "Jeśli wcześniej kupiłeś tę aplikację lub funkcję, możesz przywrócić swoje zakupy."; "views.paywall.sections.restore.header" = "Przywróć"; diff --git a/Packages/App/Sources/UILibrary/Resources/pt.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/pt.lproj/Localizable.strings index 19bc35b96..762402193 100644 --- a/Packages/App/Sources/UILibrary/Resources/pt.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/pt.lproj/Localizable.strings @@ -253,6 +253,7 @@ "views.paywall.rows.restore_purchases" = "Restaurar compras"; "views.paywall.sections.all_features.header" = "A versão completa inclui"; "views.paywall.sections.full_products.header" = "Versão completa"; +"views.paywall.sections.products.footer" = "Todas as compras são compatíveis com Compartilhamento Familiar."; "views.paywall.sections.required_features.header" = "Recursos necessários"; "views.paywall.sections.restore.footer" = "Se você comprou este app ou recurso no passado, pode restaurar suas compras."; "views.paywall.sections.restore.header" = "Restaurar"; diff --git a/Packages/App/Sources/UILibrary/Resources/ru.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/ru.lproj/Localizable.strings index 3af376c30..2e9bf8ed6 100644 --- a/Packages/App/Sources/UILibrary/Resources/ru.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/ru.lproj/Localizable.strings @@ -253,6 +253,7 @@ "views.paywall.rows.restore_purchases" = "Восстановить покупки"; "views.paywall.sections.all_features.header" = "Полная версия включает"; "views.paywall.sections.full_products.header" = "Полная версия"; +"views.paywall.sections.products.footer" = "Все покупки поддерживают Семейный доступ."; "views.paywall.sections.required_features.header" = "Необходимые функции"; "views.paywall.sections.restore.footer" = "Если вы уже купили это приложение или функцию в прошлом, вы можете восстановить свои покупки."; "views.paywall.sections.restore.header" = "Восстановить"; diff --git a/Packages/App/Sources/UILibrary/Resources/sv.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/sv.lproj/Localizable.strings index de5918bf1..a86f45042 100644 --- a/Packages/App/Sources/UILibrary/Resources/sv.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/sv.lproj/Localizable.strings @@ -253,6 +253,7 @@ "views.paywall.rows.restore_purchases" = "Återställ köp"; "views.paywall.sections.all_features.header" = "Den fullständiga versionen innehåller"; "views.paywall.sections.full_products.header" = "Fullständig version"; +"views.paywall.sections.products.footer" = "Alla köp stöder Familjedelning."; "views.paywall.sections.required_features.header" = "Krävda funktioner"; "views.paywall.sections.restore.footer" = "Om du har köpt denna app eller funktion tidigare kan du återställa dina köp."; "views.paywall.sections.restore.header" = "Återställ"; diff --git a/Packages/App/Sources/UILibrary/Resources/uk.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/uk.lproj/Localizable.strings index 34b5459c9..53dd2cee6 100644 --- a/Packages/App/Sources/UILibrary/Resources/uk.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/uk.lproj/Localizable.strings @@ -253,6 +253,7 @@ "views.paywall.rows.restore_purchases" = "Відновити покупки"; "views.paywall.sections.all_features.header" = "Повна версія включає"; "views.paywall.sections.full_products.header" = "Повна версія"; +"views.paywall.sections.products.footer" = "Усі покупки підтримують “Сімейний доступ”."; "views.paywall.sections.required_features.header" = "Необхідні функції"; "views.paywall.sections.restore.footer" = "Якщо ви раніше купували цей додаток або функцію, ви можете відновити свої покупки."; "views.paywall.sections.restore.header" = "Відновлення"; diff --git a/Packages/App/Sources/UILibrary/Resources/zh-Hans.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/zh-Hans.lproj/Localizable.strings index 43c056e9f..31b87f5db 100644 --- a/Packages/App/Sources/UILibrary/Resources/zh-Hans.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/zh-Hans.lproj/Localizable.strings @@ -253,6 +253,7 @@ "views.paywall.rows.restore_purchases" = "恢复购买"; "views.paywall.sections.all_features.header" = "完整版本包括"; "views.paywall.sections.full_products.header" = "完整版本"; +"views.paywall.sections.products.footer" = "所有购买均支持“家人共享”。"; "views.paywall.sections.required_features.header" = "必需功能"; "views.paywall.sections.restore.footer" = "如果您过去购买过此应用或功能,可以恢复您的购买记录。"; "views.paywall.sections.restore.header" = "恢复"; From f6395077f423a54798defe7be8455228bbae26b2 Mon Sep 17 00:00:00 2001 From: Davide Date: Mon, 3 Feb 2025 10:23:09 +0100 Subject: [PATCH 5/5] Revert "Reuse .hasProducts logic" This reverts commit 7346603125201b6fa0afd0e266374202d5c60cb8. --- .../App/Sources/UILibrary/Views/Paywall/PaywallView.swift | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Packages/App/Sources/UILibrary/Views/Paywall/PaywallView.swift b/Packages/App/Sources/UILibrary/Views/Paywall/PaywallView.swift index 9b36ebf98..2abf67e20 100644 --- a/Packages/App/Sources/UILibrary/Views/Paywall/PaywallView.swift +++ b/Packages/App/Sources/UILibrary/Views/Paywall/PaywallView.swift @@ -221,10 +221,6 @@ private extension PaywallView { AppProduct.Full.OneTime.allFeatures.features } - var hasProducts: Bool { - !featureIAPs.isEmpty || !fullIAPs.isEmpty - } - func fetchAvailableProducts() async { isFetchingProducts = true defer { @@ -254,7 +250,7 @@ private extension PaywallView { pp_log(.App.iap, .info, "Suggested products: \(suggestedProducts)") pp_log(.App.iap, .info, "\tFeatures: \(featureIAPs)") pp_log(.App.iap, .info, "\tFull version: \(fullIAPs)") - guard hasProducts else { + guard !(featureIAPs + fullIAPs).isEmpty else { throw AppError.emptyProducts }