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

Enabled always-on by default #2043

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

diegoreymendez
Copy link
Contributor

@diegoreymendez diegoreymendez commented Sep 26, 2023

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

Description:

In this PR we enable always on by default, and change the debug menu option's title to just "Always On".

Steps to test this PR:

  1. On a fresh install, run the app
  2. Go to More Menu > Settings > Debug Menu > Network Protection and ensure Always On is enabled.
  3. Connect NetP
  4. Go to Settings.app > VPN > Tap on the (i) icon next to "DuckDuckGo Network Protection"
  5. Ensure that "Connect On Demand" is enabled
  6. Go back to our app and disconnect NetP.
  7. Go to More Menu > Settings > Debug Menu > Network Protection and disable Always On.
  8. Connect NetP
  9. Go to Settings.app > VPN > Tap on the (i) icon next to "DuckDuckGo Network Protection"
  10. Ensure that "Connect On Demand" is disabled

Internal references:

Software Engineering Expectations
Technical Design Template

@diegoreymendez diegoreymendez self-assigned this Sep 26, 2023
@diegoreymendez diegoreymendez marked this pull request as ready for review September 26, 2023 10:17
@@ -98,7 +98,7 @@ public struct UserDefaultsWrapper<T> {

case syncEnvironment = "com.duckduckgo.ios.sync-environment"

case networkProtectionDebugOptionAlwaysOnEnabled = "com.duckduckgo.network-protection.always-on.enabled"
case networkProtectionDebugOptionAlwaysOnDisabled = "com.duckduckgo.network-protection.always-on.disabled"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changing the user default so that it will be ON by default for existing users. In any case the change makes sense IMO since the default is now going to be ON, so the presence of this will most likely indicate that the user disabled always on.

case .enableAlwaysOn:
cell.textLabel?.text = "Enable Always On"
case .toggleAlwaysOn:
cell.textLabel?.text = "Always On"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed the name since the tick in the debug menu options indicates whether this is ON or OFF.

@@ -54,7 +54,7 @@ final class NetworkProtectionDebugViewController: UITableViewController {
}

enum DebugFeatureRows: Int, CaseIterable {
case enableAlwaysOn
case toggleAlwaysOn
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This case is really for toggling always on, not enabling it.

Copy link
Contributor

@graeme graeme left a comment

Choose a reason for hiding this comment

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

Works like a charm. Thanks for doing this! 👍

@diegoreymendez diegoreymendez merged commit decefae into develop Sep 26, 2023
@diegoreymendez diegoreymendez deleted the diego/enable-always-on-by-default branch September 26, 2023 16:45
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