From f73da42a3d60cea5715f256cab425ead8377b039 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Sun, 4 Jan 2026 13:31:11 -0600 Subject: [PATCH] Make iCloud sync available to all users (remove from premium) - Remove PremiumGate from iCloudEnabled property - Update SettingsView to use regular toggle instead of premiumToggle - Remove premium section header for iCloud sync - Update proSection description to remove 'sync' - Remove iCloud Settings Sync from ProPaywallView benefits --- .../Features/Paywall/ProPaywallView.swift | 1 - .../Features/Settings/SettingsView.swift | 39 +++++++++++-------- .../Features/Settings/SettingsViewModel.swift | 9 ++--- SelfieCam/Resources/Localizable.xcstrings | 13 +++---- 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/SelfieCam/Features/Paywall/ProPaywallView.swift b/SelfieCam/Features/Paywall/ProPaywallView.swift index 2b7b3b8..b5c35bf 100644 --- a/SelfieCam/Features/Paywall/ProPaywallView.swift +++ b/SelfieCam/Features/Paywall/ProPaywallView.swift @@ -29,7 +29,6 @@ struct ProPaywallView: View { BenefitRow(image: "person.crop.rectangle.fill", text: String(localized: "Center Stage Auto-Framing")) BenefitRow(image: "timer", text: String(localized: "Extended Self-Timers (5s, 10s)")) BenefitRow(image: "star.fill", text: String(localized: "High Quality Photo Export")) - BenefitRow(image: "icloud.fill", text: String(localized: "iCloud Settings Sync")) } .frame(maxWidth: .infinity, alignment: .leading) diff --git a/SelfieCam/Features/Settings/SettingsView.swift b/SelfieCam/Features/Settings/SettingsView.swift index a3e6747..66b2ae4 100644 --- a/SelfieCam/Features/Settings/SettingsView.swift +++ b/SelfieCam/Features/Settings/SettingsView.swift @@ -129,9 +129,9 @@ struct SettingsView: View { proSection - // MARK: - Sync Section (Premium) + // MARK: - Sync Section - premiumSectionHeader(title: "iCloud Sync", systemImage: "icloud") + SettingsSectionHeader(title: String(localized: "iCloud Sync"), systemImage: "icloud") iCloudSyncSection @@ -543,7 +543,7 @@ struct SettingsView: View { .font(.system(size: Design.BaseFontSize.medium, weight: .semibold)) .foregroundStyle(.white) - Text(String(localized: "Premium colors, HDR, timers, sync & more")) + Text(String(localized: "Premium colors, HDR, timers & more")) .font(.system(size: Design.BaseFontSize.caption)) .foregroundStyle(.white.opacity(Design.Opacity.medium)) } @@ -566,24 +566,31 @@ struct SettingsView: View { .accessibilityHint(String(localized: "Opens upgrade options")) } - // MARK: - iCloud Sync Section (Premium) + // MARK: - iCloud Sync Section private var iCloudSyncSection: some View { VStack(alignment: .leading, spacing: Design.Spacing.small) { - // Sync toggle (premium) - premiumToggle( - title: String(localized: "Sync Settings"), - subtitle: !isPremiumUnlocked - ? String(localized: "Upgrade to sync settings across devices") - : (viewModel.iCloudAvailable + // Sync toggle + Toggle(isOn: $viewModel.iCloudEnabled) { + VStack(alignment: .leading, spacing: Design.Spacing.xxSmall) { + Text(String(localized: "Sync Settings")) + .font(.system(size: Design.BaseFontSize.medium, weight: .medium)) + .foregroundStyle(.white) + + Text(viewModel.iCloudAvailable ? String(localized: "Sync settings across all your devices") - : String(localized: "Sign in to iCloud to enable sync")), - isOn: $viewModel.iCloudEnabled, - accessibilityHint: String(localized: "Syncs settings across all your devices via iCloud") - ) + : String(localized: "Sign in to iCloud to enable sync")) + .font(.system(size: Design.BaseFontSize.body)) + .foregroundStyle(.white.opacity(Design.Opacity.medium)) + } + } + .tint(Color.Accent.primary) + .padding(.vertical, Design.Spacing.xSmall) + .disabled(!viewModel.iCloudAvailable) + .accessibilityHint(String(localized: "Syncs settings across all your devices via iCloud")) - // Sync status (only show when premium and enabled) - if isPremiumUnlocked && viewModel.iCloudEnabled && viewModel.iCloudAvailable { + // Sync status (show when enabled and available) + if viewModel.iCloudEnabled && viewModel.iCloudAvailable { HStack(spacing: Design.Spacing.small) { Image(systemName: syncStatusIcon) .font(.system(size: Design.BaseFontSize.body)) diff --git a/SelfieCam/Features/Settings/SettingsViewModel.swift b/SelfieCam/Features/Settings/SettingsViewModel.swift index 028a939..6588d23 100644 --- a/SelfieCam/Features/Settings/SettingsViewModel.swift +++ b/SelfieCam/Features/Settings/SettingsViewModel.swift @@ -347,13 +347,10 @@ final class SettingsViewModel: RingLightConfigurable { /// Whether iCloud sync is available var iCloudAvailable: Bool { cloudSync.iCloudAvailable } - /// Whether iCloud sync is enabled (PREMIUM) + /// Whether iCloud sync is enabled (available to all users) var iCloudEnabled: Bool { - get { PremiumGate.get(cloudSync.iCloudEnabled, default: false, isPremium: isPremiumUnlocked) } - set { - guard PremiumGate.canSet(isPremium: isPremiumUnlocked) else { return } - cloudSync.iCloudEnabled = newValue - } + get { cloudSync.iCloudEnabled } + set { cloudSync.iCloudEnabled = newValue } } /// Last sync date diff --git a/SelfieCam/Resources/Localizable.xcstrings b/SelfieCam/Resources/Localizable.xcstrings index c77252d..abb5498 100644 --- a/SelfieCam/Resources/Localizable.xcstrings +++ b/SelfieCam/Resources/Localizable.xcstrings @@ -242,8 +242,8 @@ "comment" : "Name of a ring light color preset.", "isCommentAutoGenerated" : true }, - "iCloud Settings Sync" : { - "comment" : "Description of a benefit when the user has the premium membership and can sync their iCloud settings.", + "iCloud Sync" : { + "comment" : "Title of the section that allows users to enable or disable iCloud sync of their photos and videos.", "isCommentAutoGenerated" : true }, "Last synced %@" : { @@ -292,8 +292,9 @@ "comment" : "Benefit description for the \"Premium Colors + Custom Color Picker\" benefit.", "isCommentAutoGenerated" : true }, - "Premium colors, HDR, timers, sync & more" : { - + "Premium colors, HDR, timers & more" : { + "comment" : "A description of the additional features available in the Pro version of the app.", + "isCommentAutoGenerated" : true }, "Purchase successful! Pro features unlocked." : { "comment" : "Announcement read out to the user when a premium purchase is successful.", @@ -483,10 +484,6 @@ "comment" : "A button label that prompts users to upgrade to the premium version of the app.", "isCommentAutoGenerated" : true }, - "Upgrade to sync settings across devices" : { - "comment" : "A description of the benefit of upgrading to sync settings across devices.", - "isCommentAutoGenerated" : true - }, "Upgrade to unlock 5s and 10s timers" : { "comment" : "A message displayed to users who want to upgrade to unlock longer self-timer durations.", "isCommentAutoGenerated" : true