Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/release-tauri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ jobs:
APPLE_SIGNING_IDENTITY: ${{ vars.APPLE_SIGNING_IDENTITY }}
APPLE_TEAM_ID: ${{ vars.APPLE_TEAM_ID }}
SWITCHIFY_TELEMETRY_ENDPOINT: ${{ vars.TIMBERLOGS_ENDPOINT }}
SWITCHIFY_LICENCE_PUBLIC_KEYS: ${{ vars.SWITCHIFY_LICENCE_PUBLIC_KEYS }}
SWITCHIFY_SUPABASE_URL: ${{ vars.SWITCHIFY_SUPABASE_URL }}
SWITCHIFY_SUPABASE_PUBLISHABLE_KEY: ${{ vars.SWITCHIFY_SUPABASE_PUBLISHABLE_KEY }}
steps:
Expand Down Expand Up @@ -338,6 +339,7 @@ jobs:
SWITCHIFY_UPDATER_PUBLIC_KEY: ${{ vars.TAURI_UPDATER_PUBLIC_KEY }}
SWITCHIFY_CERTUM_CERT_THUMBPRINT: ${{ vars.CERTUM_CERT_THUMBPRINT }}
SWITCHIFY_TELEMETRY_ENDPOINT: ${{ vars.TIMBERLOGS_ENDPOINT }}
SWITCHIFY_LICENCE_PUBLIC_KEYS: ${{ vars.SWITCHIFY_LICENCE_PUBLIC_KEYS }}
SWITCHIFY_SUPABASE_URL: ${{ vars.SWITCHIFY_SUPABASE_URL }}
SWITCHIFY_SUPABASE_PUBLISHABLE_KEY: ${{ vars.SWITCHIFY_SUPABASE_PUBLISHABLE_KEY }}
steps:
Expand Down
38 changes: 38 additions & 0 deletions docs/licensing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Desktop licensing operations

Depends on the version-1 format in `tools/licence-keygen/README.md`.

Set repository variable `SWITCHIFY_LICENCE_PUBLIC_KEYS` before the first paid
release. Its value is a JSON object mapping issuer IDs to raw 32-byte Ed25519
public keys in unpadded base64url. Never put the private key in this variable.
Release jobs pass this public configuration into the compiled Rust verifier.
No variable means licensing is disabled (development/CI and existing releases);
a nonempty invalid configuration locks paid features and reports an error.
Do not publish a paid build without testing its actual public configuration.

Store the matching signing key outside Git and separately in the fulfilment
service's secret store. Generate a partner key and a sandbox purchase key,
then verify both in the actual paid build while disconnected from the network.
Do not embed the test-vector issuer into production.

Local `licence.json` and the separate `com.enaboapps.switchify.pc.licence`
keychain record retain the earliest trial start and latest observed timestamp.
A revision counter ensures a removed key is not restored from an older mirror.
The file is checkpointed about once a minute; the keychain mirror is refreshed
at launch and whenever a key is entered or removed. While the mirror is known
to be stale the checkpoint retries it with exponential backoff (one minute
doubling to about an hour), merging the keychain record before writing so an
earlier trial or a newer removal stored there still wins.
Licence state does not enter account settings, pairing records or cloud sync.
The trial starts on the first run of a licensing-enabled build, including
upgrades from older free versions. Offline trial reset prevention is best effort.
A local clock rollback does not rewind the recorded trial timestamp.
If the keychain record cannot be read and the file is missing, a trial starts
and the earlier keychain record wins again once it is readable; while it stays
unreadable the new file is trusted, the same best-effort gap as deleting it.

Before going live, verify on macOS and Windows: activation, restart offline,
removal, invalid-key replacement, file import, temporary keychain unavailability,
expiry during held input/repeats, and local-switch recovery with focus moving
between applications. Run macOS native checks with `npm run macos:run`.
Automated tests must use fake input and must not read the real clipboard or keychain.
2 changes: 1 addition & 1 deletion site/src/content/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Switch access for Windows and Mac. Point anywhere on screen, open m

Switchify PC lets you use a Windows PC or a Mac with one or more switches. It runs on the computer itself. You can also pair it with Switchify on an Android phone or tablet to control the computer from there.

It is free and open source under the AGPL-3.0.
It is open source under the AGPL-3.0. See [licences, trial and purchase keys](/licence/).

## What you can do with a switch

Expand Down
32 changes: 29 additions & 3 deletions site/src/content/docs/licence.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,39 @@
---
title: Licence
description: Switchify PC is free and open source under the GNU Affero General Public License v3, and the parts it includes from other projects keep their own licences.
description: Switchify PC is open source under the GNU Affero General Public License v3, and the parts it includes from other projects keep their own licences.
---

## Switchify PC

Switchify PC is free and open source software. It is licensed under the [GNU Affero General Public License, version 3](https://github.com/switchifyapp/switchify-pc/blob/main/LICENSE) (AGPL v3).
Switchify PC is open source software. It is licensed under the [GNU Affero General Public License, version 3](https://github.com/switchifyapp/switchify-pc/blob/main/LICENSE) (AGPL v3).

You can use it for free, at home, at school, at work or in a care setting. There is no agreement to accept before you install it.
## Purchase keys and the trial

Builds with licensing enabled provide a full 30-day trial on this computer. A
Switchify PC licence costs €100 once for one computer. When the trial ends,
computer scanning, dwell clicking and mobile control stop. Settings, account
management and licence entry remain available. Ordinary development builds do
not enable paid licensing.

Open **Settings → Licence** to paste a key, choose **Paste and activate**, or
import a text licence file. The key is checked on your computer and needs no
internet connection or Switchify account. Keep a private copy for reinstalling
or moving to another computer; stop using the old computer when transferring
its licence. Removing a key does not refund a purchase or restart the trial.
Signing out or deleting your Switchify account does not remove the local key.

If the trial has ended, the Licence page automatically moves focus between
buttons every 1.5 seconds. Any configured local switch selects the focused
button. Copy your key first, then choose **Paste and activate**. This recovery
mode controls only this page; it does not type or move the pointer in other
applications. For help or a lost key, contact info@theswitchify.app.

Using the mouse, pressing Tab, or typing in the key field pauses automatic
button scanning on the Licence page. Choose **Resume automatic button
scanning** when you want to use your local switches again.

Purchases and automatic key delivery are being prepared. Do not use an
unannounced checkout link until licence delivery is available.

The licence also lets you study, change and share the app. If you share it, changed or not, the licence sets out how you must make the source code available. A changed version you share must stay under the same licence. If people use your changed version over a network, you must offer them its source code. The [source code](https://github.com/switchifyapp/switchify-pc) is on GitHub. Read the licence for exactly what applies.

Expand Down
Loading
Loading