Commit Graph

3008 Commits

Author SHA1 Message Date
Davide
fbfa600d67
Use tagged PassepartoutKit packages (#1021)
Closes #956
2024-12-17 18:57:45 +01:00
Davide
a81b615261
Bump version 2024-12-17 18:50:27 +01:00
Davide
a577b0fc20
Sort config 2024-12-17 18:45:24 +01:00
Davide
c422f06713
Drop malformed keychain group
Fixes #725
2024-12-17 18:29:00 +01:00
Davide
6255a273fe
Add recurring products to paywall (#1019)
Suggest whenever .fullTV is suggested. For this reason, subscriptions
are not suggested to existing full version purchasers, because they only
miss the one-time .appleTV purchase. Group purchases by feature products
and full version products, e.g.:

- Features
  - Apple TV
- Full version
  - Yearly
  - Monthly
  - Full
  - Full + TV

Additionally, fix reloadReceipt() slowing down onLaunch() sometimes. The
warning sign would appear on restricted profiles until the receipt is
loaded.
2024-12-17 18:23:27 +01:00
Davide
6e8f10f919
Improve CI and local scripts (#1020)
- Move non-CI scripts to "scripts"
- Use lowercase variables consistently
- Work with relative paths
- Work with environment
- Parametrize Xcode build/version number (move uniq last)
2024-12-17 13:10:43 +01:00
Davide
ef59dcc08e
Reword strings in "Purchased" view
Title: "Purchases"
Products header: "Products"
2024-12-16 21:57:05 +01:00
Davide
789f6ad515
Unify paywall and eligibility (#1018)
- Present paywall only on save/connect because PurchaseRequiredButton
instances were presenting paywalls with partial requirements
- Retain PurchaseRequiredButton just to flag paid features visually, but
do nothing on tap
- Suggest paywall products via IAPManager and required features, rather
than from views
- Handle .sharing/.appleTV requirements in ProfileCoordinator, rather
than in StorageSection
- Discontinue platform purchases, but treat as full if iOS + macOS
2024-12-16 21:45:36 +01:00
Davide
ffb8829f4f
Reorganize Core Data containers (#1017)
Before anything, remove any code related to App Group containers from
tvOS target because they are not available. Include the beta receipt
override, it's broken for that reason.

In short:

- Store all Core Data containers locally. Do not use the App Group for
Core Data for consistency across platforms.
- Store logs in the App Group on iOS/macOS, but locally on tvOS (see
`urlForCaches`).

Then, rather than one container per model, merge models into:

- Local: Providers
- Remote: Profiles + Preferences (now in the same CloudKit container)

Reuse the remote model for backups too.

This change is safe because:

- Local profiles are stored via Network Extension in the keychain, not
Core Data
- Remote profiles are re-imported via CloudKit sync
- Providers are re-downloaded on first use
- Preferences are lost, but they are "cheap" data
- Profile backups are lost, but they were hidden anyway
2024-12-15 20:20:33 +01:00
Davide
1751c94891
Fix README 2024-12-15 19:47:09 +01:00
Davide
93559b3a48
Parallelize all tests 2024-12-15 14:22:37 +01:00
Davide
d6aaa4364c
Bump version 2024-12-15 14:06:34 +01:00
Davide
3a1ef87b95
Fix ProfileManagerTests waiting for wrong event 2024-12-15 14:06:17 +01:00
Davide
8ad71b2980
Bump version 2024-12-15 13:52:05 +01:00
Davide
3ecb308d57
Resolve Apple TV crashing on launch (#1016)
Create preferences container locally because tvOS cannot write to App
Group container.

Fixes #1007
2024-12-15 13:49:39 +01:00
Davide
a04c1072c8
Allow Ethernet on-demand on all platforms (#1012)
Fixes #1010
2024-12-14 21:59:25 +01:00
Davide
b9353a6b02
Temporarily disable auto-deletion of migrated profiles (#1013)
Leave room for downgrade until 3.0.0 is stable.
2024-12-14 21:58:39 +01:00
Davide
750b12c4ee
Improve variables in Config.xcconfig (#1011)
- Group variables linked to App Store Connect
- Reuse App ID as IAP prefix
- Reuse CloudKit prefix in container identifiers
2024-12-14 21:27:31 +01:00
Davide
e793c5d6ce
Update App Store description (#1009)
Closes #631
2024-12-14 11:32:41 +01:00
Davide
1837d0576e
Update README (#1008)
- Simplify badges
- Drop app description, annoying to maintain (refer to the website)
- Drop screenshots (refer to the App Store)
- Update Credits
- Inform about private PassepartoutKit

Fixes #613
2024-12-14 09:44:10 +01:00
Davide
ea931aa4c7
Update bundle 2024-12-12 23:56:40 +01:00
Davide
f82bf92a51
Update library to uniform version 2024-12-12 23:53:01 +01:00
Davide
d0f25d6d6e
Add translations for the former 12 languages (#1005)
Closes #588
2024-12-12 23:32:27 +01:00
Davide
e44c520601
Bump version 2024-12-12 18:46:03 +01:00
Davide
88c53bed2e
Regroup views/logic of VPNProviderServerView 2024-12-12 18:44:14 +01:00
Davide
2075f109f2
Fix unselectable presets (#1004)
Revert #996 and do something midway:

- When set, use preset filter as selection (disambiguate compatible
presets)
- Set initial preset filter with current selected server preset

Server selection still picks a random preset if:

- Preset filter is "Any"
- More than one preset is compatible
2024-12-12 18:38:16 +01:00
Davide
4fb457aee2
Get optional device/platform from scripts 2024-12-12 16:56:16 +01:00
Davide
d9edef2f3c
Update App Store screenshots 2024-12-12 16:55:53 +01:00
Davide
f1944d92db
Bump version 2024-12-12 12:49:59 +01:00
Davide
ed45e5d2e4
Fix a Core Data crash on Apple TV (#1003)
Could not create the Preferences Core Data container in the App Group
because sub-directories did not exist. Create them upfront when using
App Group URLs.

This was not an issue with other Core Data containers because they are
stored in the app directories, where "Library/Documents" already exists.
2024-12-12 12:48:58 +01:00
Davide
9bf615b0ba
Bump version 2024-12-12 11:40:09 +01:00
Davide
81aa3a2714
Skip onboarding migration if no migratable profiles (#1002)
Annoying!
2024-12-11 22:20:14 +01:00
Davide
c6b3ad5921
Move unlocalized metadata to "default" language (#1001)
`deliver` may reuse default language resources for all localizations.
2024-12-11 21:52:02 +01:00
Davide
76a570b7b3
Autogenerate framed screenshots from HTML/CSS (#1000)
Add TV screenshots and organize PassepartoutUITests with two test plans
for generating iOS/macOS (Main) and tvOS (TV) screenshots. Revert to the
.attachment destination and use `xcparse` to export the screenshots.
Change iPad screenshots to portrait.

Then autogenerate framed screenshots in two steps:

- Export the UITests screenshots per device (`export.sh`)
- Embed the results in a HTML/CSS template and take snapshots with
Chrome headless (`compose.sh`)
- Repeat for all devices (iPhone, iPad, Mac and Apple TV)
- Save framed screenshots to the `fastlane` screenshots directory
2024-12-11 20:33:58 +01:00
Davide
ff88b3562d
Clean up dangling module preferences (#999)
Erase on module removal, reference is otherwise lost forever.
2024-12-10 20:33:35 +01:00
Davide
16a59c6de1
Reuse .pause() in screenshots 2024-12-10 18:59:27 +01:00
Davide
7d327b21d7
Reuse some iOS code in tvOS UI tests 2024-12-10 18:51:51 +01:00
Davide
d8447ddb38
Fix a few things about screenshots
- Postpone "Connected" screenshot
- Disable "Only favorites" to avoid iOS failure
- Prefix screenshot filename with device name and "0"
2024-12-10 18:37:53 +01:00
Davide
f441a2eed0
Autogenerate screenshots for all platforms (#998)
Unframed for now.

- Split Main/TV targets
- Extend ProfileManager for screenshot scenarios
- Rename UITesting to UIAccessibility

Active profile looks very big on TV simulator, temporarily commented
`.padding(.top, 50)` in ActiveProfileView.

Closes #974
2024-12-10 18:06:23 +01:00
Davide
a626722224
Fix TV active toggle color when on-demand 2024-12-10 17:31:33 +01:00
Davide
9b86d129ef
Update bundle 2024-12-10 15:33:05 +01:00
Davide
ddd45c1855
Bump version 2024-12-10 15:30:45 +01:00
Davide
2b3c28832b
Migrate provider favorites to Core Data entities (#997)
Rather than a Codable array.
2024-12-10 15:19:07 +01:00
Davide
c7bba033fe
Fix incorrect selection of VPN preset (#996)
Drop "Any" to rather make the preset filter an explicit preset
selection.

Regardless of `filtersWithSelection`, _always_ enforce the preset filter
to:

- The preset of the currently selected entity
- The first among available presets (normally non-empty)

Fixes #995
2024-12-10 14:45:07 +01:00
Davide
6f9c78b257
Track module preferences history in Core Data (#994)
Restore CDModulePreferencesV3 to track the history of module prefrences.

This way, excluded endpoints may be saved globally to Core Data as a
starting point. Then in Profile.userInfo we only save the relevant
exclusions for the current configuration.

The .excludedEndpoints relationship is therefore moved out of
CDProviderPreferencesV3.

Further refactoring:

- ModuleViewParameters now includes a ModulePreferences observable that
module views can observe
- Tunnel doesn't need access to PreferencesManager anymore (exclusions
are in Profile.userInfo)
2024-12-10 14:13:10 +01:00
Davide
aeec943c58
Move ModulePreferences to Profile.userInfo (#993)
Store module preferences in the Profile.userInfo field for atomicity.
Access and modification are dramatically simplified, and synchronization
comes for free.

On the other side, fix provider preferences synchronization by using
viewContext for the CloudKit container.

Fixes #992
2024-12-10 11:18:52 +01:00
Davide
912f62b29e
Revert "Unobserve ProfileEditor"
This reverts commit f1a0ecadfa.
2024-12-09 20:35:42 +01:00
Davide
e133676872
Bump version 2024-12-09 20:02:37 +01:00
Davide
a642b27d2b
Deduplicate preferences by last update (#991)
Fixes #990
2024-12-09 09:13:16 +01:00
Davide
93a15cd766
Review incorrect behavior in preferences (#989)
- Save/rollback was done outside of MOC
- Use different contexts for module/provider preferences
  - Save providers → also saves modules
  - Discard modules → also discards providers
- Use background context because it's not automatically merged (can
rollback)
- Expose ModulePreferences in OpenVPNView as StateObject
- Rework Blacklist to a more reusable ObservableList
- Reapply #988
2024-12-09 08:44:13 +01:00