Commit Graph

129 Commits

Author SHA1 Message Date
Davide De Rosa 3fb521a584
Split Apple TV purchase (#467)
Full version features were listed when purchasing the Apple TV feature,
and this was very misleading.
2024-01-11 17:52:05 +01:00
Davide De Rosa e21e11b022
Rework how purchasable products are presented (#465)
Fixes #464
2024-01-11 16:46:52 +01:00
Davide De Rosa 990fde5325
On-demand not applying to wired connections (#463)
Condition is `#if os(macOS)`, but a Catalyst app is actually `os(iOS)`,
so the code adding the Ethernet rule was being ignored.
2024-01-11 00:15:06 +01:00
Davide De Rosa 2e989fd127
Rewrite wrong refund logic (#462)
So, if both a purchase and a refund of feature `.foobar` existed,
whatever the dates, the purchase was incorrectly discarded.

Fixes #459, fixes #461
2024-01-10 18:48:38 +01:00
Davide De Rosa 821d4c79f4
Attempt release 2024-01-09 18:18:53 +01:00
Davide De Rosa 5794229f94
Regression in purchase elegibility predicate (#460)
The cancellation predicate does not include the condition where
cancelled purchases is nil.
2024-01-09 18:17:05 +01:00
Davide De Rosa dde2d22eed
Revisit submission of OpenVPN diagnostic report (#452)
Some improvements:

- Suggest replacing the template with the description of the issue
- Attach app log
- Append purchased features

Also reuse the same body for `mailto:` reports, as metadata were not
being attached in that case.

Closes #377
2024-01-07 12:11:16 +01:00
Davide De Rosa 978c74ad6e
Attempt release 2024-01-05 23:55:19 +01:00
Davide De Rosa 4836bbac18
Restore proper OpenVPN connectivity (#447) 2024-01-05 23:54:16 +01:00
Davide De Rosa 7295249cb8
Attempt release 2023-12-31 01:24:28 +01:00
Davide De Rosa 5c5697762b
Add minimal TV app
Closes #315
2023-12-31 01:21:38 +01:00
Davide De Rosa 7d7aaa8b0c
Update paywall (#441)
Group features and drop platform purchases.
2023-12-23 12:10:34 +01:00
Davide De Rosa 239d3e6853
Fix in-app eligibility in VPN (#440) 2023-12-23 07:59:23 +01:00
Davide De Rosa 4c4876c5f7
Incorrect handling of receipt purchases (#439) 2023-12-21 08:54:00 +01:00
Davide De Rosa 1551b59f21
Use async in ProductManager (#438)
Drop legacy completion handlers. Push `Task` to the views.

Also:

- Group library tests in a test plan
- Fix a broken library dependency
2023-12-21 08:09:52 +01:00
Davide De Rosa a0da930d98
Refactor and test ProductManager (#437)
Carefully drop the StoreKit and Kvitto dependencies for ProductManager
to be testable.

Rebuild test target completely to start writing meaningful tests in
general.
2023-12-20 20:43:39 +01:00
Davide De Rosa 38b06b6bb5
Encrypt profiles stored to iCloud (#436)
Going forward, persist profiles encrypted to the CloudKit container.
Conversely, read from the encrypted field if any, falling back to the
plain JSON field.

WARNING: the change is NOT backward compatible, as it would defeat the
purpose. That is, once the profile is stored encrypted, the old plain
profile is erased and its content won't be readable by older versions of
the app.
2023-12-17 23:31:08 +01:00
Davide De Rosa 5cfa32dbb7
Add data count to WireGuard connections (#430)
Closes #312
2023-12-14 22:18:20 +01:00
Davide De Rosa d7f14aa3b4 Read updated profiles from function argument
Coming from a "will" publisher, the value in ProfileRepository is
not up-to-date. Use the function argument instead.

Fixes #367
2023-10-14 19:30:37 +02:00
Davide De Rosa 2596622a43 Attempt release 2023-10-10 23:01:19 +02:00
Davide De Rosa 12c08c132c
Update metadata and translations (#365) 2023-10-10 23:00:19 +02:00
Davide De Rosa 7de000148f
Level up to strict Concurrency (#361)
Trigger and resolve some additional Concurrency issues.
2023-09-10 20:36:52 +02:00
Davide De Rosa c5cf0ca1d2
Shift async responsibility to ProductManager (#360)
SandboxChecker should not care about what actor is running on.

Better than #356
2023-09-10 19:08:31 +02:00
Davide De Rosa 0872c27fce
Move CloudKit logic to PersistenceManager (#355)
Observe updates rather than execute operations imperatively. Also refine
responsibilities of AppContext and CoreContext.
2023-09-10 10:34:42 +02:00
Davide De Rosa c645f39254
Fix SandboxChecker actor (#356)
Mac function was still running on main actor. Only constrain to main
actor on public API.
2023-09-10 10:27:11 +02:00
Davide De Rosa c8de4605a1
Fix TestFlight sandbox detection on Mac (#354)
The Mac `#if` block must come first because in Catalyst builds, `#if
os(iOS)` holds true, and this is not the condition we want to validate
on Catalyst.
2023-09-10 08:08:26 +02:00
Davide De Rosa 6b0a08a189 Attempt release
Fix sed syntax on Mac.
2023-09-10 01:08:07 +02:00
Davide De Rosa a38e3fed7a
Look up TestFlight flag asynchronously (#352)
Xcode has been quite obnoxious recently with this issue. Start the app
with the most restrictive type (.undefined), relax restrictions after
looking up sandbox and app receipt.
2023-09-10 00:52:39 +02:00
Davide De Rosa 791b6be7d5
Allow erasing remote iCloud store (#351)
Convenient for those with privacy concerns.
2023-09-09 21:52:32 +02:00
Davide De Rosa a4ca8cc996
Support iCloud sync as an option (#350)
Sync will be enabled on upgrade for consistency with current behavior,
and disabled for new installs.

Fixes #227
2023-09-09 20:29:04 +02:00
Davide De Rosa a3cfde1950
Drop v2 migrations (#348) 2023-09-08 22:18:41 +02:00
Davide De Rosa 0f84859354
Do some housekeeping (#347)
- Be consistent with on-demand rules
- Use shortcut reduce(into:)
2023-09-08 16:20:42 +02:00
Davide De Rosa b4b2db176c
Fix .sink retain cycles (#345) 2023-09-08 16:20:01 +02:00
Davide De Rosa 4102894160
Always read profiles from fetched value (#340)
There may be a mismatch between profiles and profile headers. For
example, some profiles may appear in the main list, but the same ones
may not appear in the existing profile names when adding a new profile
(and vice versa). That's because they are being fetched from different
sources. Unify that.
2023-08-05 22:41:58 +02:00
Davide De Rosa 388af4a73c Attempt release 2023-07-30 17:47:41 +02:00
Davide De Rosa c8abb245f3
Restore on-demand backward compatibility (#338)
In #333, the non-optional field `disconnectsIfNotMatching` was removed
completely. Therefore, downgrading from 2.2.0 may lose profiles due to
the missing required field.

Mitigate the issue by restoring the field as optional, even if it's
unused, for the sake of not breaking profile serialization until the
2.2.0 release. Remove the deprecated field after that.
2023-07-30 17:43:03 +02:00
Davide De Rosa 38cca79683 Attempt release 2023-07-23 13:59:56 +02:00
Davide De Rosa 6ede6f052a
Allow editing of OpenVPN endpoints (#335)
Hosts only:

- Add new
- Edit/delete existing
- Reorder

Closes #206
2023-07-23 12:45:47 +02:00
Davide De Rosa e0dbca224f
Rework "Trusted networks" to be a generic "On-demand" (#333)
Extend the feature by also providing a complementary "include" policy,
i.e. activate the VPN _only_ on the specified networks. "Trusted
networks" was only providing the "exclude" counterpart, i.e. _except_
the specified networks.

Closes #119
2023-07-23 08:44:46 +02:00
Davide De Rosa 33af87206a
Throw error on reinstate()/connect() (#328)
Errors here were just being ignored, thus preventing error alert from
appearing.
2023-07-06 19:45:43 +02:00
Davide De Rosa fac06f58db Use versioned TunnelKit 2023-07-06 11:09:59 +01:00
Davide De Rosa addbf8ab5f Update TunnelKit with keychain fix 2023-07-06 11:05:14 +01:00
Davide De Rosa b5d230f0b9 Attempt release
Use TunnelKit 6.1.0
2023-07-05 17:16:09 +01:00
Davide De Rosa f0e3b2fa9c
Improve release workflow (#326) 2023-07-05 18:07:47 +02:00
Davide De Rosa 98e5e4cdde
Share common protocols across localized strings (#324) 2023-07-05 17:18:33 +02:00
Davide De Rosa e960943302
Revert "Move VPNProtocolType serialization to Data layer" (#319)
Reverts passepartoutvpn/passepartout-apple#318

`Codable` compliance at the domain layer (`Profile` etc.) makes this
change in serialization destructive.
2023-07-03 11:18:12 +02:00
Davide De Rosa ddf3dc313f
Move VPNProtocolType serialization to Data layer (#318)
It's crucial that the data layer has full control over how entities are
(de)serialized.

Do not leave this choice up to the domain layer by defining an enum as a
raw value type, because any change in the enum raw value would literally
be a disaster, i.e. _any_ serialized data would break instantly.
2023-07-02 13:27:46 +02:00
Davide De Rosa 278efaf347
Refactor domain errors (#310) 2023-07-02 12:51:50 +02:00
Davide De Rosa fb47def4ed
Avoid inline format for non-descriptive strings (#302) 2023-05-28 11:57:35 +02:00
Davide De Rosa 3a59ac7684
Invoke VPNManager methods with a Profile object (#309)
The VPNConfiguration parameter is opaque and tightly coupled to
TunnelKit. Connecting to a Profile makes infinitely more sense, beyond
simplifying the VPNManager class. Configuration building is fully
delegated to the strategy (as it has to be).

- VPNManager takes Profile and produces VPNConfigurationParameters
- VPNManagerStrategy takes VPNConfigurationParameters (abstract)
- TunnelKitVPNManagerStrategy takes VPNConfigurationParameters and
produces TunnelKitVPNConfiguration internally
2023-05-28 09:56:51 +02:00