Commit Graph

414 Commits

Author SHA1 Message Date
Davide f1944d92db
Bump version 2024-12-12 12:49:59 +01:00
Davide 9bf615b0ba
Bump version 2024-12-12 11:40:09 +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 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 ddd45c1855
Bump version 2024-12-10 15:30:45 +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 e133676872
Bump version 2024-12-09 20:02:37 +01:00
Davide 70200b17ea
Bump version 2024-12-09 02:07:36 +01:00
Davide f7013a98a9
Separate App/Tunnel responsibilities (#984)
Sort out the increasing mess coming from:

- AppContext*
- Dependencies
- Shared*

by doing the following:

- Keep in the "Shared" folder only the entities actually shared by
App/Tunnel
  - Create TunnelContext
  - Move AppContext and related to the App/Context folder
  - Move TunnelContext and related to the Tunnel/Context folder
- Delete Shared+* extensions, use AppContext/TunnelContext singletons
from the app
- Create a Dependencies factory singleton to create entities in a single
place
  - Split extensions by domain
- Make it clear with `func` vs `var` when a dependency method returns a
new instance
2024-12-08 18:56:39 +01:00
Davide aac04c4008
Move processor implementations to concrete objects (#983)
Formerly via blocks, now with final classes.

App:

- ProfileProcessor
- AppTunnelProcessor
- Implemented by DefaultAppProcessor in app
- Implemented by MockAppProcessor in UILibrary (for previews)

Tunnel:

- PacketTunnelProcessor
- Implemented by DefaultTunnelProcessor
2024-12-08 16:24:23 +01:00
Davide 365aa50e7a
Bump version 2024-12-06 15:34:01 +01:00
Davide 4ef47dfd77
Bump version 2024-12-04 14:21:29 +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 bcd7dff4d5
Bump version 2024-12-02 00:23:23 +01:00
Davide c50862ff6f
Bump version 2024-12-02 00:16:16 +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 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 20273e651f
Bump version 2024-11-26 20:12:03 +01:00
Davide aa9da8c9e0
Bump version 2024-11-26 16:52:02 +01:00
Davide 4d84bd1dd6
Bump version 2024-11-26 16:34:35 +01:00
Davide 1a6e566714
Bump version 2024-11-26 15:55:50 +01:00
Davide 9b8ebc10a8
Bump version 2024-11-26 11:28:44 +01:00
Davide 07b4e786c3
Localize WireGuard errors (#934)
Fixes #894
2024-11-25 11:34:31 +01:00
Davide f83a35e35d
Bump version 2024-11-24 21:21:18 +01:00
Davide a6f132a6e6
Bump version 2024-11-24 20:31:29 +01:00
Davide f0ed7af62c
Bump version 2024-11-24 20:22:00 +01:00
Davide 5fd3e3badd
Bump version 2024-11-24 20:02:21 +01:00
Davide 064e834e23
Bump version 2024-11-24 01:06:35 +01:00
Davide 839530e192
Bump version 2024-11-17 18:22:43 +01:00
Davide 12b1784ac2
Bump version 2024-11-17 16:41:47 +01:00
Davide 1ddea2ad5e
Bump version 2024-11-17 11:42:28 +01:00
Davide 83eb02aa9d
Bump version 2024-11-16 15:14:37 +01:00
Davide d724ad22d8
Bump version 2024-11-16 12:33:33 +01:00
Davide 56fb220c94
Bump version 2024-11-14 19:43:39 +01:00
Davide 5818b36cda
Copy release receipt to tunnel (#871)
Not just the provided one, because it could be the sandbox receipt.

Fixes #870 further.
2024-11-14 19:42:38 +01:00
Davide 65dfc86653
Bump version 2024-11-14 19:16:17 +01:00
Davide f6361ebf06
Fix "Purchase required" in TestFlight (#870)
- Define separate IAPManager instances for app and tunnel (different
receipt URLs)
- Copy app receipt URL over to tunnel before install/connect
- Use AppTransaction to get original build number so that
FallbackReceiptReader is also much simpler now

Fixes #869
2024-11-14 19:12:51 +01:00
Davide 114e1abe12
Add initial migration UI (#866)
Repurpose LegacyManager as MigrationManager. Present initial migration
UI from "+" menu in app home.

Different styles:

- iOS → Section / ForEach
- macOS → Table
2024-11-14 11:02:26 +01:00
Davide bfe1373c4c
Bump version 2024-11-13 22:37:00 +01:00
Davide 1b10f86bbb
Bump version 2024-11-13 22:05:28 +01:00
Davide ecd2c1d45a
Bump version 2024-11-13 21:09:46 +01:00
Davide 0a51d1a1f6
Strip package dependencies (#862)
The Library package offers the PassepartoutImplementations target for
OpenVPN/OpenSSL and WireGuard/Go, but it doesn't need it itself. Only
the main app does, so move the dependency there.

On the other side, drop the potentially problematic AppUI meta target.
Move platform filters to the Xcode project.

Indirectly fixes a crash with Xcode 16 Previews on iOS (forced to use
legacy previews before):

https://forums.developer.apple.com/forums/thread/756681
2024-11-13 21:05:53 +01:00
Davide 54f4364c33
Split test jobs (#855)
Move Core Data tests out of the Library package so that we can still use
the more efficient `swift test` for most tests.

Create a PassepartoutTests target only for tests that require
`xcodebuild`, like Core Data tests.

Eventually:

- PRs only run SwiftPM tests
- Releases run ALL tests with `scan` before `gym`
2024-11-12 18:35:44 +01:00
Davide 4c4a28ca9e
Bump version 2024-11-10 20:57:12 +01:00
Davide e07833b2a4
Revisit in-app eligibility for iCloud sharing (#837)
Restore .sharing feature:

- Merge "Apple TV" into "iCloud" section
  - "Enabled", disabled if ineligible for .sharing
  - "Apple TV", disabled if ineligible for .appleTV || !isShared
- Footer about TV restrictions

Paywalls:

- "Share on iCloud" if ineligible for .sharing
- "Drop TV restriction" if eligible for .sharing but not for .appleTV
  - Applies to full version products (user level 2)
  - Suggest Apple TV product

Restrictions:

- Toggle CloudKit sync on remote repository based on .sharing
eligibility
- Do not start tunnel on Apple TV if ineligible for .appleTV

Fixes:

- Incorrect zip() publishers in remote repository
- Resolve duplicates in Core Data, first profile wins sorted by
lastUpdate descending
- Reload receipt on OOB IAPManager events
2024-11-09 15:20:59 +01:00
Davide 83b2e6b4e0
Bump version 2024-11-07 18:36:08 +01:00