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

NetP x Subscription Clean-up #709

Merged
merged 13 commits into from
Mar 14, 2024
Merged

Conversation

quanganhdo
Copy link
Member

@quanganhdo quanganhdo commented Mar 8, 2024

Please review the release process for BrowserServicesKit here.

Required:

Task/Issue URL: https://app.asana.com/0/0/1206470585910126/f
iOS PR: duckduckgo/iOS#2565
macOS PR: duckduckgo/macos-browser#2363
What kind of version bump will this require?: Major

Optional:

Tech Design URL:
CC:

Description:

This PR addresses some tech debts in recent NetP x Subscription work:

  • Subscription access token is no longer copied to NetP auth token store. Instead, it's queried directly from the subscription library.
  • Guard the subscription-related code behind SUBSCRIPTION && ALPHA instead of just ALPHA.

Steps to test this PR:

  1. See platform-specific PRs.

OS Testing:

  • iOS 14
  • iOS 15
  • iOS 16
  • macOS 10.15
  • macOS 11
  • macOS 12

Internal references:

Software Engineering Expectations
Technical Design Template

@quanganhdo quanganhdo self-assigned this Mar 8, 2024
@quanganhdo quanganhdo marked this pull request as ready for review March 11, 2024 04:14
@@ -799,7 +799,7 @@ open class PacketTunnelProvider: NEPacketTunnelProvider {
)
} catch {
if isSubscriptionEnabled, let error = error as? NetworkProtectionError, case .vpnAccessRevoked = error {
await handleInvalidEntitlement(attemptsShutdown: false)
await handleInvalidEntitlement(attemptsShutdown: true)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially I thought there's no need to attempt a shutdown; but this is necessary when the app tries to automatically reconnect for whatever reason.

@quanganhdo quanganhdo merged commit d110859 into main Mar 14, 2024
7 checks passed
@quanganhdo quanganhdo deleted the anh/netp-subscription-clean-up branch March 14, 2024 14:30
samsymons added a commit that referenced this pull request Mar 18, 2024
* main:
  Update wireguard-apple to 1.1.3. (#729)
  Improves VPN pixel info and adds tests (#732)
  Reset Cache on Subscription Purchase & Restore (#719)
  Revert "Remove Autoconsent subfeature (#697)" (#730)
  Stub objects for Bookmarks sync (#713)
  make history entry weak to avoid retain cycle (#727)
  NetP x Subscription Clean-up (#709)
  Moves AppLaunching out of BSK as it's macOS only (#721)
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.

2 participants