Commit Graph

2947 Commits

Author SHA1 Message Date
Davide 14847b2de5
Fix missing test targets 2024-12-06 15:52:25 +01:00
Davide 365aa50e7a
Bump version 2024-12-06 15:34:01 +01:00
Davide d4eed89e9f
Allow "Routing" module in beta 2024-12-06 15:31:01 +01:00
Davide 36b8024e5b
Fix deadlock regression in DNS resolution 2024-12-06 15:25:45 +01:00
Davide e663f48bc3
Update library
- Make userInfo AnyHashable
- Prepare for profile processing in tunnel
2024-12-06 11:25:54 +01:00
Davide dfae6afcb4
Store complex preferences to Core Data (#981)
Replace favorites entities with a PreferencesManager, that returns
observables for:

- Module preferences (by module UUID)
- Provider preferences (by ProviderID)

Automate preferences availability in:

- Module views (empty for now)
- VPN server view (favorites)

Synchronize preferences by making this a CloudKit container. Preferences
are also available in the Tunnel by storing the container in the App
Group.
2024-12-06 11:24:51 +01:00
Davide f8655b09af
Move error handler to AppCoordinator 2024-12-06 10:29:50 +01:00
Davide 0fd544348f
Disclose details about selected provider server configuration (#980)
Like in v2.
2024-12-04 20:50:51 +01:00
Davide d8f5caa2f7
Improve "Purchased" view (#979)
- Show eligible features first
- Render ineligible features as secondary
2024-12-04 17:38:13 +01:00
Davide 4ef47dfd77
Bump version 2024-12-04 14:21:29 +01:00
Davide 79bb6e6bdb
Update library again
- Drop -Type suffixes from associated types
- Rename to IdentifiableConfiguration
2024-12-04 13:47:26 +01:00
Davide 355974292e
Update library with provider entities (#978) 2024-12-04 12:40:47 +01:00
Davide d4543b49ac
Update library with Provider.Metadata renaming 2024-12-04 09:26:10 +01:00
Davide d53a01864b
Fix unfriendly message on import OpenVPN
Fixes #977
2024-12-04 09:11:16 +01:00
Davide 0aaef04a25
Refactor with provider customizations (#976)
Update library with new API.
2024-12-03 20:28:33 +01:00
Davide 2d93fa64c6
Embrace simplifications in PassepartoutProviders (#975)
Update library with the new domain reorganization.
2024-12-03 16:18:05 +01:00
Davide 7611f6f7d2
Fix a tunnel crash during DNS resolution 2024-12-02 18:59:18 +01:00
Davide d6ebf4bc18
Fix .lifetime not being credited all features 2024-12-02 12:08:30 +01:00
Davide 3540e1cb1a
Redesign confusing paywall (#973)
- Split suggested product and full version
- Hide sections with no products
- Hide full features if no full products
- Fail if no purchasable products
2024-12-02 10:40:25 +01:00
Davide d885ad2a3d
Add template for import tests 2024-12-02 09:25:19 +01:00
Davide bcd7dff4d5
Bump version 2024-12-02 00:23:23 +01:00
Davide 2447db19e2
Fix compile error on TV 2024-12-02 00:23:13 +01:00
Davide c50862ff6f
Bump version 2024-12-02 00:16:16 +01:00
Davide abd1d5bb9b
Enable animations in OpenVPN credentials 2024-12-02 00:11:52 +01:00
Davide a2544b33ac
Hide OpenVPN password if provider does not require it (#970) 2024-12-02 00:01:35 +01:00
Davide 14ce23f25b
Improve confusing footer modifiers (#969)
There was duplication and a ugly `#if os(macOS)` with some footers
explicitly rendered on macOS with .themeFooter() (now .themeSubtitle()).

Move this logic to the .themeSection() modifiers by adding a
`forcesFooter` parameter. When true, a fake footer is added on macOS as
the last row of a section.
2024-12-01 23:23:51 +01:00
Davide 0a1886fe31
Handle all connection attempts in AppCoordinator (#968)
Let the AppCoordinator take care of the connection requirements via
modals:

- onInteractiveLogin() - now presented on AppError
- onProviderEntityRequired()
- onPurchaseRequired()
- Any other connection error

Subviews must not use tunnel.connect(), rather they route connection
requests via the ConnectionFlow callbacks. In particular, migrate to the
AppCoordinator the connection logic from:

- TunnelToggleButton.perform()
- ProviderEntitySelector.onSelect()

onInteractiveLogin() and onPurchaseRequired() are now handled
internally, while onProviderEntityRequired() is kept public because it's
how subviews may present the entity selector.

Extras:

- Avoid modals overlap with a 500ms delay
- Shrink interactive login size on macOS
2024-12-01 22:34:41 +01:00
Davide f87cc1da0b
Fix OpenVPN/WireGuard import error messages (#967)
OpenVPN parser was indirectly swallowing WireGuard errors.
2024-12-01 21:33:58 +01:00
Davide 725168b652
Show guidance regardless of OTP method 2024-11-30 16:15:04 +01:00
Davide 1a25102ec3
Add guidance for OpenVPN provider credentials (#966)
Some providers require specific credentials for OpenVPN, different from
account credentials. Update the API index with this information to show
an information footer and possibly a link to the OpenVPN credentials.

Also, fix the OTP footer not appearing on macOS.
2024-11-29 15:25:22 +01:00
Davide 8c305688cc
Always use setLater for paywall
Fixes #951
2024-11-29 00:13:00 +01:00
Davide d8f5aed665
Update release notes on bump (#965)
Refine symlink scripts too.
2024-11-29 00:10:22 +01:00
Davide 63496725c8
Transparent logo in version screen (#963)
Looks better on macOS and allows gradient on tvOS.
2024-11-28 22:59:37 +01:00
Davide e761979134
Extend ProfileManager events (#964)
Especially for flaky tests:

- Do objectWillChange.send() _before_ performing the change
- Send more events to .didChange to be more deterministic about test
expectations
2024-11-28 22:56:12 +01:00
Davide ed413a748e
Update SwiftLint/SwiftGen YAML 2024-11-28 19:54:50 +01:00
Davide 3a511b9474
Drop empty folder 2024-11-28 18:50:58 +01:00
Davide 7af703c164
Move app library to the root (#962)
Makes it easier to search among app files and library files.
2024-11-28 17:45:18 +01:00
Davide 2a467e0c7e
Separate AppContext for previews and UI testing (#961)
Clarify the use of contexts:

- **Production** (.shared)
- **Previews** (.mock → .forPreviews)
  - ONLY use it in UILibrary for, well, previews
  - This context has dumb profiles with UUIDs as names
  - Registry is fake
- **UI Tests** (.forUITesting)
  - Add new context for UI testing
  - Selected based on command line arguments
  - This context has mock data tuned for decent screenshots
  - Registry is real

Share the same InAppProcessor in .shared and .forTesting contexts
because the app behavior was inconsistent regarding e.g. in-app
purchases.
2024-11-28 17:31:17 +01:00
Davide 962361cb9f
Automate screenshots via UI tests (#960)
Ready for screenshots generation, except for the tests themselves and
the TV target.

- More customizations while UI testing
  - Act as full version user in IAPManager
  - Override layout with default to .grid if isBigDevice
  - Show module names in profile list/grid
- Improve mock Profile/ProfileManager
  - Meaningful profile names
  - iCloud/TV icons
  - Initial modules
- Improve XCTest extensions
  - Screenshot destination (attachment/temporary)
  - Screenshot target (window/sheet)
  - Print saved temporary URL at the end (may help with CI)
  - Append device name to screenshot filename
- Tests
- Refactor actions with the [Page Object
pattern](https://swiftwithmajid.com/2021/03/24/ui-testing-using-page-object-pattern-in-swift/)
  - Perform iPad screenshots in landscape
  - Split simple flow tests and screenshots
  - Add "Connect to" test

Closes #681
2024-11-28 15:51:03 +01:00
Davide f6c93fc2f7
Use provider description as profile name 2024-11-28 11:14:23 +01:00
Davide 42c0d7e932
Customize user level from bundle 2024-11-28 02:19:44 +01:00
Davide 581673c617
Add target for UI tests (#959)
Create UITesting target with:

- AppCommandLine/AppEnvironment: strongly typed refactoring of PP_*
environment values
- AccessibilityInfo: identifies and locates elements for UI testing

Make the app behave differently when launched with `.uiTesting`, and
expose the flag to SwiftUI via `.environment(\.isUITesting)` to:

- Use the mock AppContext
- Skip onboarding

Add PassepartoutUITests target with two screenshot tests:

- Connected screen
- Profile modal
2024-11-28 01:30:26 +01:00
Davide fc711ae98f
Get rid of downloaded API after update 2024-11-27 19:27:50 +01:00
Davide c0dc2181e3
Complete CI/CD release workflow (#958)
Import current metadata and screenshots.

Fixes #647
2024-11-27 19:10:23 +01:00
Davide 6e3e3e398e
Well 2024-11-27 18:52:46 +01:00
Davide 2de5aad093
Improve bump script with positional arguments (#957)
Get rid of the messy `bump*.sh` scripts variants with a single one with
positional arguments (all optional):

- -v: the new version number (default: current)
- -b: the new build number (default: current + 1)
- -s: the initial build for the CHANGELOG diff (default: latest tag)
- -na: do not update the API (default: do update it)
- -nl: do not update the CHANGELOG (default: present editor)
- -d: dry run

Fixes #948
2024-11-27 17:08:00 +01:00
Davide 8f778faa5d
Inform about use of profile name in Shortcuts (#954)
Now that Siri is superseded by the more general Shortcuts automations,
add an informational footer below the "Name" field of the profile
editor.
2024-11-27 15:30:15 +01:00
Davide b4caa26a47
Improve layout of installed profile (#953)
When none, fill the whitespace with an informational placeholder.
2024-11-27 14:49:23 +01:00
Davide eac1e028b2
Add version view in About/Settings (#952)
Restored from v2. Refactor LogoView for reuse.
2024-11-27 13:24:44 +01:00
Davide 14aae4e02a
Define common PreferenceProtocol 2024-11-27 09:40:32 +01:00