Commit Graph

2860 Commits

Author SHA1 Message Date
Davide
f0ed7af62c
Bump version 2024-11-24 20:22:00 +01:00
Davide
6615b69d44
Bump timeout in ProfileManagerTests 2024-11-24 20:21:39 +01:00
Davide
1431cc167c
Parallelize all tests 2024-11-24 20:15:10 +01:00
Davide
5fd3e3badd
Bump version 2024-11-24 20:02:21 +01:00
Davide
2aa91eedb0
Simplify paywall entities ()
- PaywallView is the paywall content
- PaywallModifier attaches paywall with optional confirmation
- PurchaseRequiredButton presents paywall explicitly
- PaywallReason is the compound input

Refactoring:

- PurchaseRequiredButton takes a custom view
- PurchaseAlertModifier was merged into PaywallModifier
- PurchaseButtonModifier was merged into PurchaseRequiredButton
- Modal options were packed into a single struct

Confirmation alert presented on:

- Connect to ineligible profile (AppCoordinator)
- Save ineligible profile (ProfileCoordinator)
2024-11-24 20:01:30 +01:00
Davide
064e834e23
Bump version 2024-11-24 01:06:35 +01:00
Davide
cb530d8a65
Handle TV requirements on connection ()
Fixes 
2024-11-24 01:01:04 +01:00
Davide
bad9e8b58e
Add TV settings tab ()
Includes:

- Credits
- Donations
- Diagnostics
- Version

Had to:

- Wrap tab view into a NavigationStack for full-screen navigation
- Take out navigation titles of about subviews
- Customize donations view layout with modifier
- Fix credits and debug log to support scrolling

Closes 
2024-11-23 23:01:11 +01:00
Davide
f13a292b4b
Refactor String identifiers ()
- Group all views under "views.*"
- Split global strings into actions and nouns
- Use underscores
- Clean up unused

Fixes 
2024-11-23 20:31:22 +01:00
Davide
3e2823c2e0
Suppress module name
Uneditable with , must hide potentially existing name.
2024-11-23 20:11:10 +01:00
Davide
2a46173169
Move more views to UILibrary ()
- Move about subviews to UILibrary
- Refactor about to single coordinator + platform views
- Refactor debug log to single view + content views
- Take out debug log routes from about routes
- Rename Settings* to Preferences*
- Reuse empty modifier in debug log
- Fix a visual bug in .themeTrailingValue() (extra Spacer)

Preparation for 
2024-11-23 19:26:33 +01:00
Davide
a301806ac7
Share migrated TV profiles ()
Fixes 
2024-11-23 13:33:02 +01:00
Davide
3d092d6802
Revert marker width from 2024-11-23 13:30:29 +01:00
Davide
13118a5e2e
Improve profiles layout on small devices ()
- Smaller iCloud/TV icons
- Smaller marker width
- Less spacing before info button
2024-11-22 17:05:46 +01:00
Davide
bd237c4a6f
Fix layout of multiline modules ()
- Align to .leading in multi-line
- Wrap profile rows into top/bottom spacers to adjust to tallest cell in
grid

See 
2024-11-22 13:44:06 +01:00
Davide
fb0d1abc8a
Add header to Mac menu profiles list 2024-11-22 13:09:22 +01:00
Davide
4b4fca8344
Replace active modules count with a description ()
To get access to modules, try to avoid full Profile objects. Instead,
replace the coupled ProfileHeader occurrences with a new intermediary
ProfilePreview everywhere.

This way, a ProfileProcessor can inject the localized modules
descriptions from above with the preview() method.
2024-11-22 12:52:51 +01:00
Davide
a2f246454d
List other modules in TV active profile ()
Non-VPN profiles would otherwise be very shallow.
2024-11-22 10:56:37 +01:00
Davide
9b366dcaa0
Minor UI fixes ()
Update library with some more meaningful names for Profile accessors.

Refactor a few things about TV here and there.
2024-11-22 10:05:46 +01:00
Davide
366dc62231
Drop "Name" field from modules ()
Will rather add a "Notes" field to profiles. Module names feel
overwhelming.
2024-11-22 10:05:08 +01:00
Davide
72f6a1b1a1
Fix condition for
Was never disabling sharing for shared profiles.
2024-11-22 02:43:54 +01:00
Davide
0bff571d14
Polish TV profile view ()
- Layout with some profile details
- Add colors with adjusted brightness
- Add iOS/macOS instructions
- Add pending/sleeping markers
- Add previews
2024-11-22 02:20:41 +01:00
Davide
2636711e16
Do not disconnect active profile on remote import ()
Update library for this fix.
2024-11-22 01:15:51 +01:00
Davide
14398f5f20
Fix shared profile not updated on provider server selection ()
First, rename `force` parameter of ProfileManager.save() to `isLocal`,
because it's meant to be used when saving local profiles. In such
scenario, a profile that is also remotely shared _must_ be re-saved to
the remote repository.

This was not being done when selecting a provider server, and it could
be noticed because the other devices would only receive the iCloud
update after editing the profile and re-doing a manual "Save". Only at
that point would the new profile be re-shared on iCloud.
2024-11-22 00:46:58 +01:00
Davide
b0c98ed27a
Lint XCTFail() 2024-11-21 23:01:08 +01:00
Davide
3d2a543a54
Fetch products from scratch each time ()
Do not risk getting products that may have been removed from sale.
2024-11-21 22:58:24 +01:00
Davide
c5bdb9e363
Group IAP extensions into ad-hoc folder 2024-11-21 19:44:37 +01:00
Davide
5bec574841
Test MigrationManager ()
Decouple importer from ProfileManager.
2024-11-21 19:44:20 +01:00
Davide
d74c94c125
Fix missing betaChecker arg in IAPManager 2024-11-21 19:10:36 +01:00
Davide
842375ffce
Test IAPManager ()
Refactoring:

- Split tests
- Report purchase to receipt reader (real impl does nothing)
- Abstract BetaChecker from now TestFlightChecker

Bugfixing:

- Fix duplicated code in fetchLevelIfNeeded()
- Fix observeObjects() missing .didUpdate publisher
2024-11-21 18:57:32 +01:00
Davide
2478fb204b
Test ExtendedTunnel ()
Decouple .connectionStatus to TunnelStatus.withEnvironment() for easy
testing.
2024-11-21 16:48:12 +01:00
Davide
a93fcd4c66
Test ProfileManager ()
With some housekeeping.

Bugfixing:

- Do NOT skip empty remote profiles, allow removal when mirroring
- Look up profile in all profiles, not just filtered
- Posptone non-included profile removal

Refactoring:

- Rename ProfileProcessor to InAppProcessor
- Provides ProfileProcessor + TunnelProcessor protocols
- willSave -> willRebuild (because not always called on save)
- Notify ProfileManager import events
2024-11-21 16:03:57 +01:00
Davide
c7cef70eed
Move IAP extensions to CommonLibrary
Leave CommonIAP agnostic of business models.
2024-11-21 12:09:06 +01:00
Davide
4466616339
Fix compile errors from 2024-11-21 10:47:46 +01:00
Davide
b45f9c23fe
Rearrange targets for unit testing ()
- Move and rename entities
- Split protocols and default extensions
- Move in-app entities to CommonIAP target
2024-11-20 18:05:47 +01:00
Davide
2ccd3052ac
Log verification failure in tunnel 2024-11-19 22:46:18 +01:00
Davide
74ed93a966
Check provider requirements before connecting ()
E.g. interactive login must be presented afterwards.
2024-11-19 20:51:55 +01:00
Davide
d8545a01b4
Update profiles requirements on new in-app receipt ()
Required features were only updated when reloading the local profiles,
but they may also change on in-app events due to changes in eligibility.
2024-11-19 19:44:31 +01:00
Davide
9528cecc27
Verify profile before presenting interactive login ()
If the profile is ineligible for features other than .interactiveLogin,
the interactive prompt would still be presented, but the user would hit
the paywall right afterwards.
2024-11-19 11:46:42 +01:00
Davide
35c10309a7
Reload receipt on purchase ()
StoreKit ProductView performs the purchases internally without calling
IAPManager.purchase(), which causes the IAPManager state to be
momentarily outdated.

Leverage PaywallView.onComplete() to reload the receipt and eventually
trigger IAPManager.objectWillChange, so that the app is immediately
unlocked on a successful purchase.
2024-11-19 11:36:36 +01:00
Davide
bac1d494a4
Upscale upgrade icon only on macOS 2024-11-19 11:18:00 +01:00
Davide
d78456bb90
Show upgrade icon in profiles list ()
Visually clarify that a profile requires a purchase to be enabled.

- Implement AppFeatureRequiring in Profile
- Refactor IAPManager.verify() accordingly
- Pre-compute required features in ProfileManager via ProfileProcessor
2024-11-19 08:55:41 +01:00
Davide
1536551922
Prepare WireGuard for provider selector ()
- Omit configuration on creation to show provider selector
- Take out ConfigurationView like OpenVPN
2024-11-18 17:49:47 +01:00
Davide
89d7af4df7
Rethink eligibility checks ()
- Allow unrestricted save, but show PurchaseRequiredButton
- Warn however about paid features (FIXME)
- Redesign features in paywall
- Strip already eligible features from paywall
- List required features in restricted alert
- Localize feature descriptions
- Review propagation of paywall modifiers/reasons

Extra:

- Move more domain entities from UILibrary to CommonLibrary
- Default on-demand policy to .any (free feature)
- Fix modals not reappearing after closing with gesture
- Extend UILibrary start-up assertions
2024-11-18 17:43:01 +01:00
Davide
e82dac3152
Clear previous remote import task ()
Previous task was never nil-ed out on completion.
2024-11-18 10:56:54 +01:00
Davide
a3dad4e445
Observe tunnel in grid/list
Can notice in Simulator not updating installed profile.

Regression from 
2024-11-18 09:10:15 +01:00
Davide
db592944ec
Rename module builders as functions 2024-11-17 22:30:22 +01:00
Davide
8e7f3e80ce
Update library with provider in modules ()
Move provider metadata from profile to module.
2024-11-17 22:27:02 +01:00
Davide
20813ac77e
Parametrize app name in strings 2024-11-17 18:48:40 +01:00
Davide
00ba67f135
Refactor buttons/menus
- Add divider in add profile menu
- Reuse trailing dots
2024-11-17 18:45:04 +01:00