Skip to content

Make AmoreLicensing cross-platform via injectable DeviceIdentity#6

Merged
lucasfischer merged 5 commits into
mainfrom
feat/universal
Jun 21, 2026
Merged

Make AmoreLicensing cross-platform via injectable DeviceIdentity#6
lucasfischer merged 5 commits into
mainfrom
feat/universal

Conversation

@lucasfischer

Copy link
Copy Markdown
Contributor

What

Replaces the internal, macOS-only HardwareIdentifier with a public,
injectable DeviceIdentity protocol, so AmoreLicensing builds and runs on
Linux (and any other platform) while macOS stays zero-config.

Why

Device binding relied on IOKit, which locked the whole SDK to macOS. Apps on
other platforms couldn't use AmoreLicensing at all. Exposing how a device is
identified lets callers bring their own identity while keeping the built-in
macOS behavior unchanged.

How

  • DeviceIdentity protocol (public): identifier for license binding plus
    a new deviceName shown in the licensing dashboard.
  • MacDeviceIdentity (macOS-only): the built-in implementation, serial via
    IOKit + computer name via SystemConfiguration. Renamed from
    MacHardwareIdentifier.
  • AmoreLicensing init: the cross-platform initializer takes a required
    deviceIdentity:; a macOS-only convenience initializer defaults it to
    MacDeviceIdentity(), so existing macOS callers are source-compatible.
  • Linux build: AmoreStore (Foundation currency formatting) is gated to
    Apple platforms in Package.swift; FoundationNetworking imported for
    URLSession; CI gains a swift:6.2 Linux job alongside macOS.
  • Docs: new "Custom Device Identity" article (with a Linux /etc/machine-id
    example); readme and DocC updated to drop macOS-only framing.

@lucasfischer lucasfischer merged commit e9a658d into main Jun 21, 2026
2 checks passed
@lucasfischer lucasfischer deleted the feat/universal branch June 21, 2026 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant