Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage Subscription Settings #2323

Merged
merged 139 commits into from
Jan 12, 2024
Merged

Conversation

afterxleep
Copy link
Collaborator

@afterxleep afterxleep commented Jan 11, 2024

Task/Issue URL: https://app.asana.com/0/0/1206130131426002/f

Description:

  • Integrate Subscription management options in settings
  • Adds subscription Debug options to debug menu
  • Minor fixes in SwiftUI Settings
  • Base Restore Flow

Test Requirements:

  • ⚠️ Test on device
  • ⚠️ Requires App Store Sandbox -
  • ⚠️ Test using DuckDuckGo-Alpha Target

Test Settings Options:

  1. Purchase a Subscription via the sandbox
  2. Once purchased, observe that the following subscription management (See image bewlo) options are available in Settings

image

  1. Tap "Manage Subscription"
  2. Observe Subscription Details are shown

Test AppStore Restore:

  1. Go to Settings > All Debug Options > Subscriptions
  2. Tap "Clear Authentication Data"
  3. Tap "Sync App Store Account" enter the Sandbox Password and wait for confirmation
    &. Observe Privacy Pro state is reset to Purchase Info as follows:

image

  1. Tap Learn More and try to subscribe again while you're still subscribed. (Subscription duration is ~5 minutes)
  2. You should see a "Subscription Found" message like this one:

image

  1. Tap "Restore"
  2. You should be take to the subscription settings
  3. Check Settings Menu, observe subscription management options are there again.

Internal references:

Software Engineering Expectations
Technical Design Template

afterxleep and others added 16 commits January 9, 2024 05:49
# Conflicts:
#	DuckDuckGo/nb.lproj/Settings.strings
…bscriptions/2.manage-options

# Conflicts:
#	DuckDuckGo/PrivacyPro/Subscription/Flows/AppStore/AppStorePurchaseFlow.swift
# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo/AppDelegate.swift
#	DuckDuckGo/MainViewController+Segues.swift
#	DuckDuckGo/PrivacyPro/Subscription/Flows/AppStore/AppStorePurchaseFlow.swift
#	DuckDuckGo/PrivacyPro/Subscription/SubscriptionPurchaseEnvironment.swift
#	DuckDuckGo/PrivacyPro/UserScripts/SubscriptionPagesUseSubscriptionFeature.swift
#	DuckDuckGo/PrivacyPro/ViewModel/SubscriptionFlowViewModel.swift
#	DuckDuckGo/PrivacyPro/Views/HeadlessWebView.swift
#	DuckDuckGo/PrivacyPro/Views/SubscriptionFlowView.swift
#	DuckDuckGo/SettingsCell.swift
#	DuckDuckGo/SettingsLoginsView.swift
#	DuckDuckGo/SettingsPrivacyProView.swift
#	DuckDuckGo/SettingsState.swift
#	DuckDuckGo/SettingsSyncView.swift
#	DuckDuckGo/SettingsViewModel.swift
#	DuckDuckGo/SubscriptionDebugViewController.swift
#	DuckDuckGo/UserText.swift
#	DuckDuckGo/en.lproj/Localizable.strings
@afterxleep afterxleep requested a review from miasma13 January 11, 2024 10:36
@afterxleep afterxleep marked this pull request as ready for review January 11, 2024 10:36
Copy link

github-actions bot commented Jan 11, 2024

Warnings
⚠️ PR has more than 500 lines of code changing. Consider splitting into smaller PRs if possible.

Generated by 🚫 dangerJS against 7a29bb7

Core/UserDefaultsPropertyWrapper.swift Outdated Show resolved Hide resolved
DuckDuckGo/UserText.swift Outdated Show resolved Hide resolved
DuckDuckGo/UserText.swift Outdated Show resolved Hide resolved
@afterxleep afterxleep merged commit a3f289d into main Jan 12, 2024
11 checks passed
@afterxleep afterxleep deleted the daniel/subscriptions/2.manage-options branch January 12, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants