Commit Graph

259 Commits

Author SHA1 Message Date
Davide De Rosa 14b42fbea5 Persist managers state to generic key-value store
Move all persisted state out of AppManager to where it really
belongs. To do that, inject a shared KeyValueStore object into
managers that need to persist part of their state in a strongly
typed manner.

Below are persisted states:

- PersistenceManager
    - persistenceAuthor

- ProfileManager
    - activeProfileId

- UpgradeManager (formerly AppManager)
    - didMigrateToV2 (migrate former value)

- VPNManager
    - tunnelLogFormat
    - masksPrivateData

A similar approach is used for app-specific preferences, by using
a strongly typed enum (AppPreference) together with SwiftUI
@AppStorage property wrapper.

Worth moving logging logic into a specific LogManager.

Finally, drop any former view dependency on AppManager, as states
are now accessed through specific managers.
2022-06-16 13:42:37 +02:00
Davide De Rosa 127ba28a8c Run SwiftGen manually
Build phase may raise concerns in CI.
2022-06-16 13:42:21 +02:00
Davide De Rosa 83cdd460e4 Attempt beta release 2022-05-21 19:15:48 +02:00
Davide De Rosa a2d4ed370e Revisit sidebar with per-profile VPN toggles 2022-05-21 19:15:37 +02:00
Davide De Rosa ddce671c62 Move theme extensions to non-reusable 2022-05-18 11:33:29 +02:00
Davide De Rosa b1d77cccbc Attempt beta release 2022-05-18 11:18:57 +02:00
Davide De Rosa 160338e62a Add credits in Mac about 2022-05-17 19:57:19 +02:00
Davide De Rosa 4c2a471b9f Attempt beta release 2022-05-17 19:34:13 +02:00
Davide De Rosa 6c798c8b19 Bump build 2022-05-17 16:43:14 +02:00
Davide De Rosa 16d618df0e Show info menu in ProfileView on iPad/Mac
Use .navigationBarTrailing to avoid artifact on Catalyst (item
relocates when first clicked).

Rename menu files too.
2022-05-16 11:18:58 +02:00
Davide De Rosa 743facca6b Improve Catalyst appearance
- Revert to more "stable" iPad idiom

- Set accent color the proper way

- Use .tint when available

- Unify navigation style by idiom

- Retain navigation bars in sidebar/detail

- Lighten sidebar appearance

- Fix Menu style (dropdown -> button)

- Use native Picker (dropdown)

- Use switch toggles rather than checkboxes

- Replace .actionSheet with .alert

- Increase minimum row height

CAVEAT: on Mac with iPad idiom, having a Section in .sidebar
produces artifacts. Header keeps changing height for no reason.
Retain Section on iPad multitasking only to not break navigation.
2022-05-15 22:24:36 +02:00
Davide De Rosa 683a8e7d82 Attempt beta release 2022-05-05 11:07:49 +02:00
Davide De Rosa 092233b546 Attempt beta release 2022-05-04 23:16:01 +02:00
Davide De Rosa c2676cbdf6 Attempt beta release 2022-05-04 19:03:22 +02:00
Davide De Rosa 9e9cd018eb Revert "Enable "DNS Settings" capability"
This reverts commit 75650b1f0a.
2022-05-04 09:01:27 +02:00
Davide De Rosa 3c0e511e84 Split again OrganizerView and ProfilesList
On iOS 14, Organizer scrolls abruptly on profile selection. It
looks like this was introduced by merging ProfilesList into
OrganizerView.

Try to revert merge to split observation responsibilities.

Drop unused AppManager in +Scene along the way.
2022-05-03 14:40:41 +02:00
Davide De Rosa 75650b1f0a Enable "DNS Settings" capability
Maybe fixes #182
2022-05-02 00:04:56 +02:00
Davide De Rosa 87f2ebfd9e Attempt beta release 2022-05-01 20:44:17 +02:00
Davide De Rosa edc7cdf045 Merge List into OrganizerView
- Restore wrapping Section as it seems to fix multitasking

- Hide profiles section if empty
2022-05-01 19:19:31 +02:00
Davide De Rosa 0047d095fb Adjust navigation style to all devices
- Mac
    - Drop all styles
    - Tweak hide title bar
    - Hide navigation bar

- Restore single section for all profiles
    - Allows using NavigationLink safely
    - Indirectly fixes multitasking
    - Retains selection on profile activation
    - Clean up presentActiveProfile

- Leave active profile in its position
    - Fixes Mac flashing row selection on profile activation

- Unify profile row appearance
    - Use fixed .headline font
    - Add subtitles to inactive profiles
    - Use padding rather than fixed row height

CAVEATS:

- Do not preselect active profile on iPad launch, as doing so
seems to present two ProfileView on top of each other, one from
MainView and one from the NavigationLink.

- Do not touch .listStyle() of master view, as it seems to break
navigation esp. in iPad multitasking.
2022-04-29 19:29:47 +02:00
Davide De Rosa cd854f8ebf Group profile actions into menus
- Organizer
    - Duplicate

- Profile
    - Rename
    - Siri
    - Uninstall (+ confirmation)
    - Delete (+ confirmation)
2022-04-27 09:53:42 +02:00
Davide De Rosa 4a0245d757 Rename AddHostView to .NameView
In preparation of future additions to flow.
2022-04-26 22:44:34 +02:00
Davide De Rosa 99e48119f7 Encapsulate calculation of former products
Use an interface (BuildProducts) that makes understandable and
easily extensibile how some in-app products are inferred by build
number.
2022-04-26 20:55:18 +02:00
Davide De Rosa 1ff19b331f Move VPNToggle to standalone view 2022-04-26 10:40:46 +02:00
Davide De Rosa 6434008ebd Make destructive buttons standalone
- Uninstall VPN

- Remove profile (add to ProfileView)

Create DestructiveButton with iOS 15 .role when available.
2022-04-25 16:34:22 +02:00
Davide De Rosa deac70359f Reorganize and fix platform-specific fastlane data
Reuse all iOS metadata in macOS, except the app icon.
2022-04-25 11:21:19 +02:00
Davide De Rosa c507c739bd Move WelcomeView to its own view 2022-04-23 10:25:31 +02:00
Davide De Rosa d8e47cb7c0 Refactor strings and add new ones
- Move Localizable.strings above to share *.lproj folders

- Reorg menus into contextual/system

- Shorten titles of contextual menus

- Update sharing message with WireGuard

- Drop AlternativeTo

7 phrases left to translate into 9 languages.
2022-04-22 13:12:42 +02:00
Davide De Rosa c9dfed676e Move VPN status below active profile
Rather than on the side. Similar to old subtitle table view cell.

Restore data count as well (when available).
2022-04-22 09:52:10 +02:00
Davide De Rosa 46050e0141 Refactor ProfileView a little bit
- Make welcome a computed property

- Reuse first header for consistency when loading

- Convert isDeleted to better isExisting (inverted)
2022-04-21 19:11:22 +02:00
Davide De Rosa fd7c232ecc Unroll ProfileView toolbar items
Also leave them visible when disabled.
2022-04-21 19:03:14 +02:00
Davide De Rosa d1c98006d3 Replace ReloadingContent with implicit animations
Infinite loop on init(), but horrible practice in general.

- DonateView
- PaywallView+Purchase

Also show a ProgressView while rows are loading.

DO NOT animate on .products value because animation won't work
if products are empty and stay empty after refresh. Instead,
observe .isRefreshingProducts.

Lastly, to avoid annoying animation when products are actually
available, do not refresh products if non-empty. They certainly
do not change during the application lifecycle.
2022-04-21 11:22:07 +02:00
Davide De Rosa 3f9ff50d0e Optimize Catalyst for Mac
- Fix missing PlugIns in Catalyst build

Hence the VPN failure, there was a "iOS" filter on embed.

- Fix complaint about file access permission

Seems to need R/W when importing VPN configuration files.
2022-04-19 16:48:42 +02:00
Davide De Rosa bf65f76401 Merge project into iOS + macOS
Share views with both platforms initially. Will split specific
views step by step.
2022-04-19 16:14:23 +02:00
Davide De Rosa 2af28c158d Merge 'Views' folder 2022-04-19 10:12:52 +02:00
Davide De Rosa ab0a2c8cb4 Reuse provider availability idea from 5d85699 2022-04-19 09:03:41 +02:00
Davide De Rosa 480738d126 Make shortcuts contextual in ProfileView
- Add toolbar item

- Target current profile

- Only list relevant shortcuts to profile
2022-04-19 08:41:07 +02:00
Davide De Rosa 18161ed1f1 Group Organizer modals into toolbar menus
- Drop status / navigation bars colors

- Restore large title on iPad

- Overlay organizer with "No profiles" when empty

- Uninstall VPN from ProfileView
2022-04-19 08:38:10 +02:00
Davide De Rosa 017182fe81 Rewrite ReloadingSection to be semantic only
Use Group instead of Section. Also fix elements not loading if
initially empty.
2022-04-18 19:51:28 +02:00
Davide De Rosa 0849fe6cc7 Attempt beta release 2022-04-13 19:49:58 +02:00
Davide De Rosa 5874ce4b9d Attempt beta release 2022-04-13 19:40:18 +02:00
Davide De Rosa 8026caa5ef Attempt beta release 2022-04-13 11:20:21 +02:00
Davide De Rosa c7f7dd89a1 Attempt beta release
Update script.
2022-04-13 10:16:43 +02:00
Davide De Rosa 1532e8808b [ci skip] Address CI and ASC validation issues
- Skip tests until fixed wg-go issue

- Add golang step

- Set "Apple Development" at project level

- Set Catalyst platform for gym

- Drop TARGET env variable clashing with WireGuardKit

- Disable SwiftGen script phase

- Fix TunnelKit segfault on archive

- Xcode 13.2.1 compatibility
    Fix some issues with @MainActor
    Use #available instead of #unavailable

- Raise timeout from 10 to 15 minutes

- Update beta description

- Tunnel bundle ids cannot have periods

- CFBundleDisplayName required in tunnels
2022-04-13 10:00:29 +02:00
Davide De Rosa 4aba5f46aa Rewrite app in SwiftUI 2022-04-12 15:12:45 +02:00
Davide De Rosa 8f16bf376d Attempt beta release
Fix naive compile issue.
2022-02-04 14:18:01 +01:00
Davide De Rosa e38a2598e2 Attempt beta release 2022-02-04 13:11:01 +01:00
Davide De Rosa 3c2966c836 Attempt beta release 2022-02-04 12:27:28 +01:00
Davide De Rosa 31361bf0d8 Attempt beta release 2022-02-04 12:19:18 +01:00
Davide De Rosa 08008dda23 Try lower macOS target to 10.14
Requires TunnelKit update.
2022-02-02 19:36:23 +01:00
Davide De Rosa 72044a5e41 Fix globbing in "Run Script" phases
See 549cd17dbd
2022-01-07 21:55:56 +01:00
Davide De Rosa 4c673338b7 Attempt beta release 2022-01-07 19:00:33 +01:00
Davide De Rosa d55fb5dc0f Attempt beta release 2022-01-04 09:26:55 +01:00
Davide De Rosa 549cd17dbd Delete frameworks from all .appex 2021-12-17 14:47:45 +01:00
Davide De Rosa 05a460d55f Attempt beta release 2021-12-08 16:11:38 +01:00
Davide De Rosa 4f9bbac178 Attempt beta release 2021-12-04 11:53:51 +01:00
Davide De Rosa 97c6a6f356 Attempt beta release 2021-12-03 15:35:44 +01:00
Davide De Rosa 82aaa0b386 Attempt beta release 2021-11-30 16:40:28 +01:00
Davide De Rosa 6d541284a5 Attempt beta release 2021-11-30 12:49:46 +01:00
Davide De Rosa 51821660d2 Commit build number with beta
Pick base build number from env, not project. Can now drop
fetch-depth 0 from workflow, no needs for commits count.
2021-11-29 19:06:59 +01:00
Davide De Rosa 104c856e45 Fix PEM caching PR in TunnelKit 2021-11-25 12:23:28 +01:00
Davide De Rosa 46fef91f5c Revert to TunnelKit with OpenSSL
- Remove extra "Frameworks" in .appex
- Restore TLS security level 0
- Disable Bitcode for OpenSSL to link properly
2021-11-24 17:03:41 +01:00
Davide De Rosa fd529752ee Revert iOS target to 12
TunnelKit only requires 12.
2021-11-18 13:10:44 +01:00
Davide De Rosa b3de7f3a73 Bump build 2021-11-14 19:41:07 +01:00
Davide De Rosa 3ccdfc7626 Bump build 2021-11-12 10:30:25 +01:00
Davide De Rosa 8833c4dbab Update TunnelKit with BoringSSL
- Optimize package granularity and imports
- Adjust targets to smaller TunnelKit components
- Raise iOS target to 13
- Drop support for TLS security level
2021-11-11 15:45:09 +01:00
Davide De Rosa 7ecbd48e18 Do some project cleanup
- Update bundle
- Merge old CFG_* variables
- Drop useless Metal build settings
- Fix package warning about case
2021-11-11 15:06:43 +01:00
Davide De Rosa ae1aa1a268 Reorganize project with SwiftPM
- Drop CocoaPods completely
- Make PassepartoutCore a Swift package
- Enable Bitcode to fix OpenSSL linkage (iOS)
- Update CI scripts without CocoaPods
2021-11-06 11:18:55 +01:00
Davide De Rosa 28d7517497 Fix building for test targets 2021-10-10 18:34:21 +02:00
Davide De Rosa f6af9a3fb8 Bump build number 2021-10-05 20:48:26 +02:00
Davide De Rosa 40ab30365a Bump build 2021-10-05 08:01:13 +02:00
Davide De Rosa ca1adb424a Bump base build number 2021-10-01 19:42:45 +02:00
Davide De Rosa 6dc748ab87 Bump base build number 2021-10-01 10:48:56 +02:00
Davide De Rosa b0fff93c89 Update bundle/pods 2021-09-27 18:11:58 +02:00
Davide De Rosa d1a1b555f8 Rename to LocalProduct to avoid StoreKit clash
Started happening with Xcode 13.
2021-09-27 18:01:42 +02:00
Davide De Rosa dd7f144bb3 Move VPN.shared from TunnelKit to Core
Start moving legacy out of inner library.
2021-09-20 20:07:30 +02:00
Davide De Rosa 5cf593ed2b Move strings generation to Core
Also fix missing account guidance on iOS.
2021-08-09 10:06:09 +02:00
Davide De Rosa 0ebddc6a68 Drop unused app strings and redo SwiftGen
Prefix is now just L10n without strings filename.
2021-08-07 14:00:35 +02:00
Davide De Rosa 31cd5be376 Reuse generic guidance strings
Tell by credentials purpose (web or specific).
2021-07-30 17:58:27 +02:00
Davide De Rosa 6487d10cb9 Add missing translations 2021-04-16 16:29:20 +02:00
Davide De Rosa 394762f5d6 Restrict features with purchase screen
- Providers
- Trusted networks
2021-02-04 14:09:24 +01:00
Davide De Rosa e59b6c8723 Upgrade Xcode project 2021-02-04 14:09:09 +01:00
Davide De Rosa 7d2ece0256 Share ProductManager in Core with conditionals
In order to share purchase review logic.

Refactor verification of product eligibility
2021-02-04 14:03:47 +01:00
Davide De Rosa 21e9f5c8cc Integrate new in-app purchases
- Share iOS bundle identifier with macOS
- Remove unused macOS donations (reuse iOS if needed)
- Add platform-specific "Full version"
- Skip fetching of legacy providers IAP
2021-02-04 14:03:47 +01:00
Davide De Rosa dd3cac40c6 Bundle macOS app with iOS 2021-02-02 21:25:59 +01:00
Davide De Rosa 8e1c2aea32 Add it macOS translation 2021-01-26 18:05:56 +01:00
Davide De Rosa 9fa40f6ec6 Share configuration l10n in Descriptible 2021-01-13 08:20:10 +01:00
Davide De Rosa 5f83313b79 Bump base build number 2021-01-06 18:01:28 +01:00
Davide De Rosa 8d31bdc22f Fix Xcode version in CI
Xcode was 12 instead of 12.2 and therefore OpenSSL was failing on
Apple Silicon arch (MacOSX arm64).
2021-01-06 17:36:00 +01:00
Davide De Rosa 4c1fe20160 Upgrade Xcode project 2021-01-03 22:28:08 +01:00
Davide De Rosa d4b7d47498 Merge macOS app and Core into repository
Temporarily drop env and fastlane.
2021-01-03 22:28:07 +01:00
Davide De Rosa 1213212332 Move ProductManager to Core 2020-12-27 16:56:25 +01:00
Davide De Rosa 6b07e7eb9e Fix wrong deployment target (14.2 -> 12.0) 2020-11-21 19:05:29 +01:00
Davide De Rosa 2f42099bd0 Update project and deprecated APIs 2020-11-15 22:21:31 +01:00
Davide De Rosa 267119b0fd Fix overridden deployment targets 2020-11-15 17:42:21 +01:00
Davide De Rosa 4887c27816 Update TunnelKit with VPN manager 2020-06-23 09:54:39 +02:00
Davide De Rosa c033c208bd Upgrade project 2020-05-23 17:59:53 +02:00
Davide De Rosa 6159221d0b Add/update translations
Legitimate:

- es
- fr
- it
- pl
- ru
- zh-Hans
2019-12-11 12:28:03 +01:00
Davide De Rosa 28a7dcdcf7 Update providers via web service
Reload products after update. Always re-list products!

Had to fix web services in Convenience, completion handler not
invoked from main queue.
2019-11-28 11:34:01 +01:00
Davide De Rosa 97f458385c Update to API v3
- Dynamic providers
- Add index.json to API
2019-11-28 09:57:34 +01:00