Skip to content

fix(audience): lock context.libraryVersion to the SDK version#793

Merged
nattb8 merged 2 commits into
mainfrom
feat/sdk-489-lock-audience-library-version
Jun 15, 2026
Merged

fix(audience): lock context.libraryVersion to the SDK version#793
nattb8 merged 2 commits into
mainfrom
feat/sdk-489-lock-audience-library-version

Conversation

@nattb8

@nattb8 nattb8 commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Fixes SDK-489.

context.libraryVersion identifies the tracking library itself, and we rely on it to segment audience telemetry by SDK version (it is how the recent IL2CPP stripping regression was diagnosed). Game developers could override it through the public AudienceConfig.PackageVersion property, which let arbitrary values land in that field and undermine the signal. This pins libraryVersion to the SDK's own version and removes the override.

The version still comes from Constants.LibraryVersion, which ConstantsTests.LibraryVersion_MatchesPackageJson already keeps in sync with package.json, so there is no risk of it drifting.

Breaking change: removes the public AudienceConfig.PackageVersion property (minor bump on the 0.x line). It was unused internally. If developers need to report their own game/app version later, that should be a dedicated field rather than reusing libraryVersion.

🤖 Generated with Claude Code

context.libraryVersion is the analytics identity of the tracking
library itself, used to segment telemetry by SDK version. It was
developer-overridable via AudienceConfig.PackageVersion, letting
arbitrary values pollute that signal. The override was also unused
internally.

Source libraryVersion from Constants.LibraryVersion at the Track /
Identify / Alias call sites and remove the public PackageVersion
property. Drift from package.json stays guarded by
ConstantsTests.LibraryVersion_MatchesPackageJson.

Breaking: removes public AudienceConfig.PackageVersion.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@nattb8 nattb8 requested review from a team as code owners June 14, 2026 23:21
AudienceConfig.PackageVersion was removed; the sample's diagnostic
config echo no longer compiles against it. libraryVersion is no longer
a config value, so it is dropped from the echo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@nattb8 nattb8 merged commit b3c2a16 into main Jun 15, 2026
50 of 55 checks passed
@nattb8 nattb8 deleted the feat/sdk-489-lock-audience-library-version branch June 15, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants