Repository navigation
v0.5.0
Closes #50.
A 0.x minor that changes the API list: EnvironmentSnapshot's initializer and stored properties
change, and beginSession() returns a value. The payload version moves to 2.1.0, which adds three
fields and a preset and fixes two values, each checked against TelemetryDeck's SwiftSDK at
58f43629, its docs at 2b9c2108 (the default-parameters reference, basics/acquisition.md, and
articles/decide-to-drop-ios-version.md), and its KotlinSDK at 10b87d4a.
Payload 2.1.0
device.systemMajorVersion, sent asTelemetryDeck.Device.systemMajorVersion: the major OS
version,26. The vendor documents it among its default parameters, its SDK sends it, and its
docs describe the prebuilt system-version chart offering a major-version breakdown beside the
major.minor one.
All three version strings stay bare (26.5.1,26.5,26). The default-parameters reference
types each only as a String, and the vendor's own articles show both forms; its Swift SDK
prefixes the platform where its Kotlin SDK sends the major and major.minor versions bare. A
changed form would split every chart already grouped on the baresystemVersionand
systemMajorMinorVersion, and the new field takes the same form as those two.runContext.language, sent asTelemetryDeck.RunContext.language: the language the app runs in,
the locale's language code.calendar.dayOfWeek, sent asTelemetryDeck.Calendar.dayOfWeek: the local day numbered as ISO
8601 numbers it, Monday 1 through Sunday 7, as the vendor documents it and its SDK sends it.userPreference.languageis the language the user most prefers on the device, the language
subtag of the firstLocale.preferredLanguagesentry, as the vendor defines it. It was the
locale's language, which is the app's, so an app localized only in English reportedenfrom a
device set to German. The key and the form are unchanged.calendar.isWeekendistrueon a Saturday or a Sunday, as the vendor defines it, and is
derived from the day of week. It followed the locale's weekend, so under a Friday-Saturday weekend
a Friday reportedtrueand a Sundayfalse. The key and the form are unchanged.PresetSignal.newInstallDetected,acquisition.newInstallDetected, sent as the vendor's
TelemetryDeck.Acquisition.newInstallDetected. The vendor's docs name that signal as how new
users are detected, sent on first launch. Its SDK sends it whenever a session starts with no
stored session behind it, which is also after 90 days without a session, or after sessions that
each lasted under a second. This package reports it once per retention record, so only after an
install or an erase.
API
SignalRecorder.beginSession()returnstruewhen the call created the retention record, which
makes its session the first counted since install or since the last erase. It is
@discardableResult, so an existing call compiles unchanged. It returnsfalseon every later
session, on a repeat in the same activation, and while collection is not permitted. The session
resetClosingCollection(during:)reopens is counted by that reopen, so no laterbeginSession()
reports it: a host that counts a data reset as a new install records the preset once that call
returns. ARetentionStorewhoseload()returns nil, for a record it could not decode
included, reads as no record, and the next session reportstrue.SignalRecorder.recordNewInstallDetected(parameters:)records the preset, unprefixed like the
other presets. The recorder never records it on its own: a host calls it whenbeginSession()
returnstrue, on the path every other signal takes, so whatever the host applies there covers
it too.EnvironmentSnapshotholds the OS version once, assystemMajorVersion,systemMinorVersion,
andsystemPatchVersion, in place ofsystemVersionandsystemMajorMinorVersion, and derives
all three version fields from it.languagebecomespreferredLanguageandappLanguage. The
initializer takes the new properties.EnvironmentSnapshot.current()takespreferredLanguages:, defaulting to
Locale.preferredLanguages.
Upgrading
- A call to
EnvironmentSnapshot's initializer passes the three version components and the two
languages. Calls tocurrent()andbeginSession()change nothing. - An install whose retention record predates the upgrade already has one, so
beginSession()
never reports it as new. - A host swapping to this package from the vendor's SDK starts every existing install without a
retention record (ADOPTING.md, Phase 6). Its firstbeginSession()after the swap returns
true, and recording the preset on that answer counts every existing install as new on the
migration day. After that, a user returning from 90 days away is not counted as new again, as
the SDK would count them, and the three OS version fields arrive bare where the Swift SDK sent
them with the platform.
Tooling
- A contract suite records a signal through the recorder, encodes it with the adapter, and holds it
to TelemetryDeck's SwiftSDK at58f43629and its default-parameters reference at2b9c2108, as
read on 2026-09-29: the key set, the value forms, the deliberately absent keys and their reasons,
and the install preset's name. The test floor rises to 224. - The consumer fixture compiles a host's activation with the new preset.