Repository navigation
Release 0.0.3 - #2
Merged
Merged
Conversation
- Add InstallIdProvider: per-app-install UUID v7 persisted in UserDefaults
("kontextso.installId"). Generated on first call, validated against the
canonical UUID shape on read (overwrites on corruption), stable across
launches and conversations until uninstall / app-data clear.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…sion `#/.../#` Swift Regex literal requires iOS 16 at runtime; KontextKit's deployment target is iOS 14, so CI's strict availability check failed. `String.range(of:options:.regularExpression)` is iOS-4-vintage and produces the same match check. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cuts KontextKit 0.0.3 with one new provider.
InstallIdProvider(new)Per-app-install identifier returned as a UUID v7 string. Persisted in
UserDefaultsunder"kontextso.installId":getOrCreate()call.SecRandomCopyBytesfor the random bits;arc4random_buffallback for the documented-never-fail-but-still-belt-and-braces case.8-4-4-4-12hex) on read. Malformed values — accidental corruption, partial UserDefaults migration, a future SDK changing the format — are overwritten with a fresh ID so the SDK never ships garbage upstream.defaults: UserDefaults = .standardis dependency-injected purely for tests — production calls use the default.Stable across app launches and conversations; resets only when the user uninstalls / clears app data.
Why?
Sibling iOS SDKs (
sdk-swift,sdk-react-native,sdk-flutter) attach this on every/init,/preload,/error, and/debugrequest so the ad server can key pacing, frequency caps, and per-install diagnostics to a stable identity independent ofconversationIdoruserId. Web SDKs (sdk-js,sdk-react,sdk-vue) use the samekontextso:installIdkey shape underlocalStorageso wire shape is consistent cross-platform.Test plan
xcodebuild test -scheme KontextKit -destination 'platform=iOS Simulator,name=iPhone 16 Pro,OS=latest,arch=arm64' -skipPackagePluginValidation— greeninstallIdappears on every preload body and is stable across app relaunchespod lib lint KontextKit.podspec --allow-warnings --use-libraries0.0.3, GitHub release,pod trunk push KontextKit.podspec --allow-warnings --use-libraries🤖 Generated with Claude Code