DropletEnvironmentService

Read-only facts about the host and the machine it is running on.

@MainActor protocol DropletEnvironmentService : AnyObject

Properties

appVersion

@MainActor var appVersion: String { get }

Marketing version of the running Droppy, for example "15.2.2".

containerDirectory

@MainActor var containerDirectory: URL { get }

A private, per-droplet directory that persists across updates. Create it lazily; the host guarantees the parent exists.

didChange

@MainActor var didChange: AnyPublisher<Void, Never> { get }

Fires whenever notchGeometry or surfaceAppearance changes.

dropletCallbackURL

@MainActor var dropletCallbackURL: URL? { get }

Base URL for callbacks to this droplet in this host, or nil when external URL delivery is unavailable. Append your route, for example dropletCallbackURL?.appendingPathComponent("settings"), instead of hardcoding Droppy's scheme. Playground uses its own scheme so replies reach the development app. Requires API 1.20.0.

isHarness

@MainActor var isHarness: Bool { get }

Whether this process is the local development harness rather than Droppy itself. Prefer feature detection over branching on this; it exists for diagnostics and for demo data in previews.

notchGeometry

@MainActor var notchGeometry: DropletNotchGeometry { get }

Geometry of the notch surface the droplet is currently rendered on.

surfaceAppearance

@MainActor var surfaceAppearance: DropletSurfaceAppearance { get }

The appearance on the target display described by notchGeometry. A physical-notch shell stays Dark; notchless shells follow the system. This service is shared by all of a droplet's views. A view mounted on several displays uses its inherited colorScheme or adaptive colour tokens for drawing, so each mount resolves its own appearance.